Fix on windows

Windows uses `\r\n` as new line characters, so the expected result would be a stream without any `\r` and `\n` characters.

This fix uses node's [`os.EOL`](http://nodejs.org/api/os.html#os_os_eol) for platform compatibility.