fix mktemp usage