Fix bugs in the generator that occur when TimeAsVector is off.
Copy SliceThickness and SliceLocation when writing image.

SliceThickness is a required acquisition parameter, so it should definitely
be copied if the output slices match the input slices.   SliceLocation is
optional, and a bit arbitrary, but it is nice to be consistent and match
it with the source data if possible.