Added check for test directory existence
recursively delete folder