Properly adjust the srcdir vs builddir paths

Affected unit tests load testdata from the srcdir.  Previously, there
was a kludge that chdir()ed to the tests srcdir, but that get removed
during refactoring.  Instead of introducing the kludge again, the paths
were fixed to be properly prefixed with TESTS_DIR as needed.

(cherry picked from commit 16595cdd)
66 jobs for !6378 with fanf-tests-build-deps-v9_18 in 18 minutes and 47 seconds (queued for 8 seconds)
latest merge request