submodules: refactor computation of relative gitdir path