The spikes are actually from the angles under the M. The outline produced is like this (the white line is the actual text border):
Attachment:
Miter.png [ 25.09 KiB | Viewed 4166 times ]
I can't think of a good way to make sure this never happens, but you can always reduce the miter limit (2 is a bit excessive, 8 would have been enough).
Since your "M" looks symmetric, my hypothesis is that you did the outline on a rasterized layer, not on the original text layer. On the latter, the script uses the path from the text, while with a rasterized layer, it does an alpha-to-selection and select-to-path, and in that case the symmetry of anchors is far from guaranteed.
This said, nothing earth-shattering in the script, everything can be done manually in a few clicks.