Closes #1023 (closed). A couple of regexes look for
$$ inside of the math tags and removes them before the manuscript is saved.
I'm not sure why we're getting these extra dollar signs from XSweet, and I suspect the problem should really be fixed there. This code won't hurt if it is fixed there.