Prevent false positives in open file handle test (rebased onto dev_4_4)

See gh-504.  This PR should make this job green again: http://hudson.openmicroscopy.org.uk/view/Bio-Formats/job/BIOFORMATS-merge-stable/