Fix temp directory creation