delete tmp files after use for attachment export

what if an exception is raised after line 807 but before this line, won't the zipfile never be deleted? Is this a case worth considering? Should put this `os.remove`, and potential the `temp_file.close` in appropriate final blocks?