Fixes some bugs with strings

Note: The StringBuilder marshalling (or the netcdf lib) don't work, so
the right answer is to use a byte[] and then use a proper encoding to
convert. It shouldn't have been a StringBuilder at all (ever).