Don't log to STDOUT on production.

- Added a condition to not set the logger on production environment.
- Created a spec with three scenarios to cover all cases:
-- With no extra configuration.
-- Where rake is defined.
-- When on production.
- Setup the test environment to hide Rake before each scenario.
- Setup the test environment to unset the Logger after each scenario.