Fixed small errors in operations for copying to and from mongodb gridfs.