dir.c::match_pathname(): adjust patternlen when shifting pattern