Fixes for previous change for CRLF

Handle the newlines a bit better. Needs reviewing as this may cause issues in binary files.  Need to think about that!