Replace usage of str() with six.text_type

Replace using of str with six.text_type as it's able to
handle unicode data.

Change-Id: I38e4378c490d1dad8020312308dd3b6dad8772c0
Merge "Replace usage of str() with six.text_type"