Updated package rendering so that opts are available in template

Some modifications to rendering of files, also for better support of the `defaults` option of my other PR when one wants to use these defaults in a template.

The ERB rendering doesn't use the local binding anymore, but now merges `opts` and given options (second argument of both `render` and `template`) and use that as context.

NB. This causes that local variables won't be passed on to the template anymore.