Fix GridFSLoader

It seems that a previously suggested patch never made it into the repo (cf. issue #305)
Update test case accordingly
Merge pull request #461 from upro/gridfs-fix

Fix GridFSLoader