remove trailing / path of each submodule