Temp file must be open as binary.

This is causing problems in Windows based systems for me.
Merge pull request #163 from rafadc/master

Temp file must be open as binary.