Require 'rails_env' task only when needed

Backport of 4b8b8c1b4d1b516a9ebf8e19d5a14956c5654ac8
Merge pull request #12 from square/fix-rails-env-for-database-rake

Require 'rails_env' task only when needed