Python 3 compatibility (pyprof2calltree.py)

In #8, I have missed few more instances of the same kind of problem: strings are saved to a file, which is opened as a binary stream. I'm sorry about that.