pathspec: convert some match_pathspec_depth() to dir_path_match()