This test is unable to ouput in a designated folder, it's always in "test.dir", I think it should use a environment variable or a parameter to define where to make the tests, and if nothing is passed then do a fallback to a default value.