Disabled curl peer verification and fixed writing of binary data to files. Works on Windows and OS X now.