BUG: runtests: make -t option work again

Chdiring to `build/test` before running in gh-2986 broke the `-t` option in runtests. This PR fixes it again.