Tested directory bug fix!  Added some tests to bash script.