use pg_config to determine postgresql bin directory and use it if available

For some reason, Ubuntu postgresql package doesn't create links to the postgresql binaries in /usr/bin. This patch uses pg_config if available to determine the binary directory and use it in the specs to create/drop the test database.