parse_pathspec: support stripping submodule trailing slashes