Fix for PostgreSQL databases with dashes in the name

Fixes this error: psycopg2.ProgrammingError: syntax error at or near "-"
Merge pull request #530 from dbunskoek/patch-1

Fix for PostgreSQL databases with dashes in the name