Open file in binary mode so that windows don't mangle the binary format output file