Test script in root

Ensures a few common mistakes aren't present, such as non-working
database connection. Will be used in installation scripts.