Make export and query somewhat Python2 compatible.
Update toolbox import to recent version.