util.funcs: test for Encode, DecodeOption. bug fix (thanks test).