Removing erroneous directories