Add file check for named pipe

Checking for named pipes works differently from sockets.
Merge pull request #274 from wanelo/is_pipe

Add file check for named pipe