fixing base/database.rb to correctly handle sqlite connections #9