tested and cleaned
working solution to loop (but not recursive, thus lengthy)
Merge branch 'master' of https://github.com/ablwr/cavppers into ablwr-master
Merge branch 'ablwr-master' into directoryinput