Try to fix a bug with parsing database uri.

The problem is when parsing a unix socket location (so a unix pathname
to a directory) for the host parts.