Write hashing test files in binary mode for Windows compatibility