[gridfs] improve ls() search condition