Run tests when file is executed as a script.
Add tests for repository classes (and fix a bug)
Add `import nose` to test_conf.py