fixed copying files in generate.js
Added sinon dependency
Refactored template.js to only expose loadTemplate and isTemplate - wip