Add EOL at EOF

Write a newline character at the end of the file written, because
EOL should be treated as "line terminator", not "line separator".

Close #13.