Does not work in Rails 3.0.3

Earlier versions of `ActiveRecord::Tasks::DatabaseTasks` either do not exist or do not include the `current_config` method.

I implemented a check to see if it is defined and define it if not. This fixes the `rake db:test:prepare` invocation errors.