BUG: Savetxt may ignore newline character on Windows:

Under some circumstances savetxt ignores the newline character on Python 2.7 running on Windows:
If newline is set to '\n', actually '\n\r' is written, because of the linesep conversion of file.write.

Closes #3975.