Plenty of errors surfaced with better test coverage. Aside from fixing
the broken implementations, this also prompted me to fully implement
the dirs command.
Also changed the run-tests script to always set cwd to the test folder,
so that tests that change cwd don't affect others (ehum, that'd be
mine.)
More tests to follow.