Update wait_for module to handle directories as path parameter.

Allows directories to be passed as the path parameter and also checks their absence or presence.