Support waiting for the existence of non-regular files

Adds support for waiting for the existence of non-regular files (e.g. unix domain sockets).