Change to_unicode behavior with python2

Added more attempts to write correct unicode string (without using repr)