When copying files from s3, new file is opened with binary flag so as to handle files with character encodings