more optimal dynamic /tmp creation routine