Fixed api token generation.
Merge pull request #643 from alexkalderimis/hf642

Fixed api token generation.
removes unused code
Fixes #664. This makes sure that python code is actually correct
Fixed a perl test while I was there
Merge pull request #665 from alexkalderimis/664-python-code-gen

664 python code gen
Merge pull request #663 from intermine/610

removes unused code
Merge branch 'master' of github.com:intermine/intermine into beta
Merge branch 'beta' of github.com:intermine/intermine into beta