Handle directories in tgz