Fix template normcase bug, changed to normpath.