Close temporary files to avoid warning on Python 3.