Improve support for external tests dir