update pyyaml req in setup.py to accept range
update unicode call for python3 compatibility