test script: close DB connection on error in setup
make tests work with postgis 1.5 (for Debian-based distributions only)