fix for BSD mktemp