Fix the conversion of list or tuple args to a SQL.

When there is one element on the list, the generated SQL was
(1,) (python notation of a single element tuple, which is not
valid in SQL.