Add checks to "r_file_mkstemp" calls