Fix race-condition when creating test_directory in test-base.cfg.