Py2.6 fixes for tags command.
Python3 fixes for tags command.