Use six.iteritems for compatibility with python 3

Use `six.iteritems` function to support python 2 and 3

Fixes issue #12