Detect windows and write binary file

http://stackoverflow.com/questions/6552121/how-to-download-files-over-http-via-python-urllib2-correctly
Forgot brackets in last commit