Fix handling of segment include_modes

Segments should only be included if rules for both inclusion and
exclusion are satisfied, satisfying one or the other is not sufficient.

If the include_modes list for a segment is missing or empty consider all
modes to be included so that users do not need to supply an exhaustive
list, since there isn't much point in actually wanting an empty include
list.  Check that the include list exists before working with it to
avoid KeyError exceptions.  Actually check for mode name in the list
rather than mistakenly checking for the segment object.