Rewrite for yeoman-generator 0.17.x

I get an error saying `#writeJSON` doesn't exist.