I think I missed this before but path2utf cannot be update to path2utf(MCStringRef, MCStringRef&)... path2utf takes a string and encodes it as UTF8 - thus it ceases to be a stringref. It should be replaced with MCStringConvertToUTF8String(), this returns a c-string pointer that must be freed.