"The idea of it is that if you're working in "my-code/lib/Foo/Bar/", you don't want to chdir all the way back to "my-code/" before you run your test suite."

Why? Just run two terminals -- one to run tests and run to edit. There are so many better ways to solve the problem of running your test suite while you "jump around" inside the source tree -- pushd and popd come to mind as well. I am curious as to how much time it took you to write this and contrast with how much time this actually saves you.