Fixed mistakes in my bug fix

 Sorry didn't realize you had changed from using 'wb' thats totally my fault. The version on pypi doesn't have that so I have been making that change. Sorry about that. Using the git version now though.