Remove references to empty folders