Fix the generator

Since the change from JSON to YML, this generator is broken. Update the code to make it work.
:+1:  Also note you can do `Rails.root.join("app", "views" ...` because `Rails.root` returns a [`Pathname`](http://apidock.com/ruby/Pathname).