Make the tar creating utility copy directory entries as well

Some builds can rely on the presence of the empty directories, so we need to make sure they are copied over. The removed (unrelated) test will be resubmitted in another PR.