Make `npm test` generate template-based files

This moves the logic that creates `README.md`, `index.js`, and `package.json` to `index.js`.