Make sure the string is NUL-terminated.

The internal byte array of the SmallString filled by createTemporaryFile() is
not guaranteed to be NUL-terminated. We need to call c_str() to handle it
safely.