tests: detect base path to enable running tests from within test directory.

cmd: npm test ..