Make including javascript/handlebars more robust

Now all templates won't need a js()/hb() function if they inherit base.mako.