Turned templating.py into a proper library for interacting with the jinja engine. Simplified some code in build.py, minimised use of globals, abstracted some code in run() out into functions. Tweaked some templates.
Merge branch 'template-tweaks' into development

Conflicts:
	megaphysics/build.py