Fixes for March 2013 bug week (rebased onto develop)

Same as https://github.com/openmicroscopy/bioformats/pull/408