Address handling binary files on windows systems.

Hello,

Ruby requires a special flag to correctly handle binary files on windows systems.

http://ruby-doc.org/core-1.8.7/IO.html#binmode-method
http://ruby-doc.org/core-2.0.0/IO.html#binmode-method