fixed newline code in format_whole_file 

Using "\r\n" introduces an extra CR on Windows since Python applies the system-appropriate newline for "\n" when writing files opened in text mode. No need for "lineEnding" logic since we can just use "\n" in all cases.