Change regexp in contructor to allow filename.

To add ability to use UNIX domain socket, filename must be allowed as hostname.