Workaround for ndimage.affine_transform endianness bug

Need to swap the bytes of the output array when its endianness is not native.
Added test.
Merge pull request #279 from lesteve/resample-img-non-native-endianness

Workaround for ndimage.affine_transform endianness bug