Make Rake tasks work without Rails

* Define an empty `:environment` task (this won't override an existing one)
* Check if `Rails` constant is defined; if not, project root is working
  directory