Clean Up <export> Tag

Fixes #34. Also changes basestring to str for Python3 compatibility.