Detect non-gzipped tar files more reliably

In addition to starting with the string `package/`, they may also start
with a `pax_global_header`, and this is almost certainly an indication
that we are dealing with a tar file.  For example, git adds a global
header with the commit sha when producing archive files.