Fix GridFSLoader

It seems that a previously suggested patch never made it into the repo (cf. issue #305)