Fix crash when zones.d directory doesn't exist.

Fixes #6224
Set parent_host_name in Dependency objects to the host's name for apply rules.

Fixes #6197