Fix escaping for args for python3

Prior to this change, passing a dict or tuple of args to connection.execute did not work, the %s would be left in the query without the replacements being substituted in.