Set downloadFIle to use fopen

Changed CreateFile to fopen, and changed WriteFile to fwrite.
downloadFile should work more consistently.