Convert many fopen calls to fopen64 to ensure we can read/write past 2GB...

.... Resolves #1026.