added boilerplate to be able to run tests from anywhere. Added test for validate_and_insert too.
Merge pull request #183 from niphlod/issue/tests

added boilerplate to be able to run tests from anywhere