_setup_settings: be more robust against partial db creation

Signed-off-by: Thomas Stilwell <stilwellt@openlabs.co>