use portable basestring type for isinstance's

See: https://github.com/catkin/catkin_tools/pull/98/files#r18181263