Try to fix test_tarfile issues on Windows buildbots by closing file
objects explicitly instead of letting them linger on.
2 files changed