Python 3 fix - use dict.items() instead of iteritems()

In Python 3 dict.items() also returns an iterator.