t_temp_file needs to be left as a c-string I think because mkstemp modifies it... i.e. build an MCStringRef *after* calling mkstemp().