fixed grabdata to use commonprefix on tar files