Bugfix for newlines

In some cases line breaks are indicated with the \r character instead of the \n.
Merge pull request #1 from CupOfTea696/patch-1

Bugfix for newlines