grep: use get_pathspec() correctly