Adding logic to preserve directory entries for tarball