smartcd: fixed template installation function