[CHEF-4795] Use binmode for tempfile

https://tickets.opscode.com/browse/CHEF-4795