Add support for field names when writing to dataset.

Addresses #42, which has been pending since 2009 (!).