add unix domain socket support

update version of

https://gist.github.com/Downchuck/8531692