Change to_c_repr() to with_c_repr()

This prevents a use-after-free in curl when passing C strings to curl.