fix use of mkdtemp