Fixed the removal of empty folders