Temp file must be open as binary.

This is causing problems in Windows based systems for me.