Use platform-specific newline. Fixes #987
Merge pull request #1137 from technomancy/use-newline

Use platform-specific newline. Fixes #987