convert.py: use OrderedDict

While there Pythonize convert.py a bit.