Fixed the reading of a trailing newline in a file

Fixes #67 
Any reason for the replaceAll?