don't leak memory

Each invocation of ith_temp_folder_to_try in this loop creates a new char *