Only create temp dirs if not defined.