Write files in binary mode to avoid writing CRLFs on windows
Merge pull request #178 from Seldaek/fix_line_endings

Write files in binary mode to avoid writing CRLFs on windows