Loosen prefix restrictions in FS

Fix for https://trac.openmicroscopy.org.uk/ome/ticket/10659

This is a copy of PR https://github.com/openmicroscopy/openmicroscopy/pull/989, which I could not add any more commits to (did something wrong in my fork).  It contains the fix for the unit test suggested by @mtbc