Switch to binary mode for all file operations, to suppress Windows newline translations.