Various fixes to the installation wizard

Please pull if you think this is ok. This is basically just these:

1. Fix for the use of database admin passwords that contain single quotes (U+0027) (#3, #10 in this fork) 
2. Suppress spurious error messages that are a result of a failure to connect to the database (symptom of 1)

The patch looks much bigger than it really is because 2 involves putting a bunch of lines into an “else” block and so all the affected lines have been indented.