add export template functionality
add command line export option --template
use default templates by default
avoid problem using path.join instead of simple concat
finally made it to merge branches and added branch of tralamazza