Remove redundant directories