Fix trimming of fields

Previously fields were being trimmed whenever the trim option wasn’t
being included.  But when trim was set to true, no trimming happened,
and when trim was set to false trimming happened!
Merge pull request #32 from smilli/bugfix/trim

Fix trimming of fields