Fix s3 integration tests on windows 

Need to close the file before exiting the with statement,
otherwise we still have a reference to the file obj, which
means we can't delete the file on windows.

Also includes some pep8 cleanup as a separate commit.


cc @kyleknap @danielgtaylor