add dirs
make sure cache dir exists in repo
remove nocache tags
check if nodes exist
remove unused files