Open text files in universal newline mode
Read text files in universal newline mode
Write mask in text mode