Python 3-compatible checking for unicode

This patch adds support for Python 3 to the ObjectPath shell by detecting what string type the current Python version uses.