Support for unix domain socket

Minor regexp fix. Now it determines database name correctly.