Correctly open CR/LF text files on all platforms