Escape database username, password, hostname, etc.

Fixes bug where special bash chars couldn't be used.