Prevent filename shell expansion

Ensure that file names for templates are safe to be opened and wont shell expand to multiple file names.

This is kind of a patchy job right now as I'm sure there are other characters that will cause the same issue, but this will work for now until I come up with a more comprehensive solution.