Use six when checking for strings.

`flow.step2_exchange` doesn't work under Python 3 (raises a `NameError`, since `basestring` was removed). It's best to use six when checking for string instances.