Fix attaching with UNIX sockets

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Merge pull request #355 from bfirsh/fix-attaching-to-unix-sockets

Fix attaching with UNIX sockets