correct errors in tail.py echo() call and encode as utf-8