GridFS: Refactor uppercase filename handling