Adds test to ensure invalid database get removed.

Refs #91