testlib: fixed conditions in assert_grep&grepv