This is actually not entirely trivial since we can have a path that starts with a slash but includes more ‘..’ components than there are actual directories in the path.
Incase we do a git commit that launches TextMate, it will inherit a bunch of variables from git, including GIT_DIR, which will cause issues for the Git bundle.
Previously this was under the OakSystem framework which depends on the io framework meaning that the io framework itself was unable to obtain a basic environment, which is necessary for next commit.