Replace basestring by six for python3 compatability

The builtin basestring abstract type was removed in python3,
use str instead, we need to using six.string_types to replace
the basestring for py3 compatibility.

Change-Id: Ie9fe7ef68d28902a384ba598c19f0cf3cd94d9bb
Merge "Replace basestring by six for python3 compatability"