normalise path of templates