Fixes #386
Fixed a bunch of tests.

Also added a test for the InterMineObject test case.
Merge branch 'dev' of github.com:intermine/intermine into dev