Extract all tar headers from tarfile

If the file is a regular file, it also contains a content block that
must be skipped while looping through the tarfile; otherwise, only
one entry is returned.