Fix for Windows systems

The split command wasn't doing the right thing due to the way Windows encodes a Newline.
Now it splits only if there is a CR without a LF which is the intended behaviour.
Fix for Windows systems part 2

The match didn't match due to the CR.
Fix for Windows systems part 3
Merge pull request #2 from Hypfer/master

Fix for Windows systems