We skip path which was not found in config option policy_dirs, but don't
check if the path is a directory. If path is not directory, a confusing
exception StopIteration, This commit checks that and raise ValueError
if path is not a directory.
Closes-Bug: #1401302
Change-Id: I7e199987321c528d8f13998020507755a17a2c29