I am attempting to verify that $G$ is a Green function for the oscillator equation of motion such that:
$\bigg(\frac{\partial^2}{\partial t^2} + \omega^2 \bigg)G(t-t')=\delta (t-t')$
The Green function is
$G(t-t') = \frac{i}{2\omega}exp(-i\omega |t-t'| ) $
If we set $t'=0$ we carry out the differentiation and get as far as:
$\frac{\partial^2 G}{\partial t^2}= -\frac{1}{2}i\omega e^{-i \omega |t| }sgn^2(t) + e^{-i \omega |t|} \delta (t) $
The worked solution then goes to
$\frac{\partial^2 G}{\partial t^2}=-\omega^2 G(t) + \delta(t)$
I can see where the square of the signum function would go to $1$ but what happened to the exponential factor which was multiplying the delta function?
You should put an Heaviside function multiplying your solution. In your case is $$ G(t-t')=\theta(t-t')\frac{\sin[\omega(t-t')]}{\omega}. $$ Then, $$ \frac{dG(t)}{dt}=\theta(t)\cos(\omega t) $$ and $$ \frac{d^2G(t)}{dt^2}=\delta(t)-\omega^2\theta(t)\frac{\sin(\omega t)}{\omega} $$ and you are done. I have used the fact that $$ \frac{d\theta(t)}{dt}=\delta(t) $$ and everything should be intended in the sense of distributions.