Fix pooled string being modified in write_temp_file().