Added lock to database installation. Closes #2.