Changed dbname to database in psycopg2 connection statements