Bug 959123: Modify postgres dump on restore to connect to proper database

https://bugzilla.redhat.com/show_bug.cgi?id=959123

When restoring the database, the `\connect` option was not being properly changed due to escaping "\" in the `sed` command.
Also, the username was not properly being generated due to a bug in the Bash SDK when using `set -u`.