Fix python3 filtering support.

* Test filtering was failing under python3 and would only apply the
  filters to the first test listed by discover. (Clark Boylan, #1317607)