securely create temporary directory