Robust Version of Connect.rb

The connection to the database will be established regardless of the location of the calling script