Updates to directive template.  Auto generate the tpl.html file and fix the compile and link functions.