Improved handling of tar files