prevent a study from being registered in 2 different databases
Move scripts logic to classes and speedup tests
Merge pull request #3 from andrewjpage/master

dont allow duplicate study registrations