replaced basestring with str
Removed <export> tag from package.xml when empty
Add backwards compatibility for unicode/basestring/str instance checking
Simplification of make_exports_section (pep8&doc).