Use `basestring` instead of str.

This avoids odd behaviour if a unicode string is passed into
`envoy.run`.