bpo-21987: Fix TarFile.getmember getting a dir with a trailing slash (GH-30283)

(cherry picked from commit cfadcc31ea84617b1c73022ce54d4ae831333e8d)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
3 files changed