Merge pull request #1 from mhe/master

Bringing up to date
Resolves errors with non-string values
handle space specification correctly

if 'space' is specified 'space dimension' can not. See
http://teem.sourceforge.net/nrrd/format.html#space
checks the problem is there
Merge pull request #10 from Robbie1977/master

Fixes two rare issues with header writing