I would have put the music in a separate .ly file instead of putting it in the .mako files. I guess that any lilypond user would have done so, but I don't know how much it's difficult to use external files in your project (as Mutopia does, for example).
However I would not contribute to this project unless it uses external files.
The problem you are reporting can be fixed using sed, as already advised.
However in the next future you should expect syntax changes. You are not using any \version statement in your snippets. This is a very bad practice, even if convert-ly can still update the syntax if you specify the version from which you want to update.