added tests, replaced glob() with recursiveiterator