Require rake when necessary and fix 'extend Rake' call

Closes #54