better handling of directories in tar archive