Old tar programs do not produce DIRTYPE members, they represent directories as REGTYPE members with a trailing slash. A workaround for these "buggy" archives is in tarfile.py since 2002, but got lost at some point in time. The attached patch revives this workaround and provides a regression test.