Fix connection config and use Rails.root if defined to determine db path

I seem to have broken the host configuration option in my previous PR. It currently generates a database path that looks like this: `somehost.com/3050:somehost.com/3050:/path/to/db.fdb`. This fixes that.

Also, looking at the SQLite3 adapter in Rails, they use the Rails root to determine the path to the database if it's defined. This PR adds that capability.