Setting up and tearing down temporary directory