Fix S3 upload on Windows

S3 upload on Windows was corrupting the file