Remove .encode from quotes

.encode returns an encoded byte string in python3. When a bytearray
is passed to psycopg2's adapt() it casts it to a bytearray which isnt
handled properly by to_tsquery.

http://www.postgresql.org/docs/9.3/static/textsearch-controls.html
Pep8 fixes