Rewrite for yeoman-generator 0.17.x

Hm, it appears that if I put `var pkg = require('../package.json')` at the top, generator complains `pkg is not defined`…