Fix relative import and usage of iteritems in spirit of Py3k