Fixed creation of a temporary directory in the test