Add common string types for 2/3 compatibility

Fix a python3 bug that was checking for 'unicode'. Use
common 'string_types' for python 2 and 3.

Add test_index test module and call from Travis config.