SPECFEM cleanup scripts

Hi Eric,

I decided it would probably be a good idea to record the changes I made for posterity's sake. This is not exactly what I did, as there was more experimenting involved, but I distilled it into something simpler.

There are probably way too many calls to `git filter-branch`, but the time it would take me to test out simpler forms is probably more than it would take to just run them as is, so I didn't bother.