Select EOL terminator according to OS

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Merge pull request #32 from jaalto/eol-handling

Select EOL terminator according to OS