fix #43: fixed unicode error on python 2 when piping stdout