NewImage uses 0 for smallest axis specification

This undoes a recent change. The need for this change becomes apparent when
you add axes to the NewImage dialog (i.e. frequency and polarization and
etc.). Since we build images with no Z axis when it is specified as 1 we
should admit that 0 is a valid value.

While at it I significantly improved error checking throughout the plugin.