fixes to allow reading of non-nifti files