Check for directory before creating cache dependency

When checking the VPP for resources that are handled by other virtual
providers, GetCacheDependency throws HttpException with "Directory
'[virtual path]' does not exist. Failed to start monitoring file
changes." This change verifies that the resource exists to create a
dependency on.