Use unicode strings in GUI (fixes issue #59)

The trouble was that the escape function returns a byte
string instead of a unicode string. So this patch adds a
wrapper around the escape routine.