move the tempDir property declaration into the trait