Add util.InDir
Fix Dir resolver test to succeed with multiple CPUs

Fixes this problem:

  $ go test -cpu=1,2 ./...
  ...
  --- FAIL: TestResolve (0.00 seconds)
  panic: chdir ../../testdata: no such file or directory [recovered]

See https://blog.splice.com/lesser-known-features-go-test/