Make consistent the use of new style definition of classes

Signed-off-by: Germán Poo-Caamaño <gpoo@gnome.org>
Fix string parameter in exception

Signed-off-by: Germán Poo-Caamaño <gpoo@gnome.org>
Avoid use of relative paths when importing packages
Build a dsn for connecting to a postgres database