Use os.linesep as default line ending

On Windows, the default line ending should be '\r\n' instead of '\n'.
Merge pull request #7 from ajalt/master

Use os.linesep as default line ending