When you go to clean up all those test directories, use the following command. BUT BE VERY VERY CAREFUL:
[bash]$ rm -Rf picture/test_directory
You could lose more than you bargin for, test_directory should be what you entered for $DIRPATH in the scripts above. (It never hurts for first time user to slip over somewhere else and create a directory tree, copy file to it, and test this command line before using it on something irreplacable.) Again read the manual.