add test for temp dir creation in the Hat ctor