tar.py: fixes closing in iterable file extension list