Preserve image rescale and slope when saving in NRRD file

Issue also discussed here.