fixed a bug in template class

the base tag was not taking application folder into accound and the
resulting href was wrong.