fix except syntax for python3
fix unicode check for compatible with python3
dict items for python3
add travis.yaml