clean up pathspec matching