Does that work when the test is run from the IDE? There is a test helper TestConstants#getTargetDir which gives you the target dir. If  I understoof correctly these tests are also running in container, not quite sure how it would work then!?