Fix create temp dir by template engine