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.