Escape query in cursor.execute

In python3, from certain libaries (i.e sqlalchemy),
cursor.execute must deal with query in bytes.

So decode the query, before escape the args.