Use mkdtemp instead of mktemp