Replaced iteritems() with items() for python3 compatibility.

Should resolve #2