Closes #1 : Added export calls where necessary.
#1 fix tempfile issue and some Python 3 stuff