Enable waiting on mixed entity types

Waiting on files and directories in a single invocation is now possible. To
achieve this a new dirinfoType enumeration is introduced used to differenciate
between files and directories.

A test case that checks for correct behaviour is added.

Closes #7