Fixing issue with site-install where drupal_installed? would exit uncleanly when the $database is defined in settings.php but there's no database tables yet.

We can't rely on just whether shell_out exits cleanly or uncleanly, because it could exit uncleanly due to a runtime error and not specifically a missing database. Instead, we rescue the exception and test for the system table in the database.

Adding some debug output.