Added templating capability to modules.

Added templating capability to modules. Minor changes to
generator-base.js