Allow slashes in gitfs envs, Fix #5007

Previously, we were using os.path.basename to get the last part of the "path", which we assumed was the branch (origin/master, for example).  However, if you have an env (branch) with slashes in it, it shows up as origin/dev/network or similar, and so basename was just returning network, not dev/network.

Using the string partition method, we just pull off the remote (which we assume doesn't have slashes in it), and return the rest as the env.