Ported 32bitPutFileOnDisk to 64 bit.