python3: Add basic python3 compatibility.

Use six.text_type to replace unicode() in python2
and str in python3.

Change-Id: I61e961248241014380ec464429f2585a9497333b
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Merge "python3: Add basic python3 compatibility."