fix incorrect base name offset from nftw when pathname ends in slash(es)