Fix for mac line endings in files (Fixes #286)

I tested it on `tex` files with mac line endings