if a list is empty, remove it from directory list