Don't log to STDOUT on production.

- Scoped the `defined?(Rake)` and production check statements to
individual methods for easier testing and more clarity.
- Created a test with two contexts to simulate production and
non-production environments.

This closes #43.
Assuming you're running the tests with the `rspec` CLI, and not `rake spec` (which I think everyone should do) :wink: