contrib: fix dirstatenonnormalcheck to work in Python 3
This is a redo of D1963 that has the added benefit of not breaking
Python 2. Oops.
# skip-blame because this is bytes prefixes and a s/iteritems/items/
Differential Revision: https://phab.mercurial-scm.org/D1970
#require docutils gettext
$ $TESTDIR/check-gendoc el
checking for parse errors