Fix pg_restore call to include -d flag before the database name (#4217)