Refs #54, uses lock file for tests script.

This prevents concurrent setup/teardown of the test database.