Fixing "rating=safe" search bug

Related to KiTTYsh's comment on https://github.com/shish/shimmie2/pull/345#issuecomment-66695277
bug is confirmed and here is fix for it.