fix file IO on mingw

fopen() was missing 'b' flag, so that mingw and other platforms doing
LF/CR translation screwed Data.