Adds template repository tests, updates template repo business logic to be able to delete the whole template tree, updates some script repo tests too.