Fix issue generating init.rb when creating a plugin

The nesta plugin:create command fails when attempting to generate the init.rb file due to a missing directory. I added a method call to create the needed directory as well refactored the tests a bit.