U4-451 Inconsistent line endings in template files created by Umbraco

Changed all "\n"'s to Environment.NewLine
Changed a string that was being appended in that method to a StringBuilder to be more efficient.
Cleaned up old commented out code from the method.