Fix to newline handling

Fixes #3
Ported the CSV handling from JASP!