Always open files in binary mode.

Fix for win32 where CRLF and text mode wreaks havoc with fseek/ftell.
Potential win32 MSVC compilation fixes.