Fix menu applications access with menu-cache < 0.4.0.

The libmenu-cache 0.3.3 and earlier can return only directory and
when we need access to application then it becomes tricky: we have
to get parent directory then iterate children to find requested one.