Some compatibility fixes for python3K

- Unittest2 is not available for py3K, must use unittest2py3k pypi package or simply unittest.
- checking NameError for "unicode" fails in some cases which throw 'str' has no attribute 'decode' at runtime