hooks: do not update manual index cache if directory does not exist anymore

otherwise we get this error:

ls: cannot access /tmp/example-1.0/share/man/: No such file or directory
updating manual index cache for /tmp/example-1.0/share/man ..