Remove references to directories that have been removed.