Line endings

Added handling of differing system line endings so as to avoid bad formatting of text files if the line formatting of the mustache templates doesn't match the specific system..