Use "with" statement to close NamedTemporaryFiles