'Return a dict made of all image names and their corresponding check info'

def dump_directory(self, path, **kwargs):

    templates = {}
    path = path.lstrip('/')
    try:
        directory = self.client_read(path, recursive=True)
    except KeyNotFound:
        raise KeyNotFound(('The    key    %s    was    not    found    in    consul' % path))
    for leaf in directory:
        image = leaf.get('Key').split('/')[(-2)]
        param = leaf.get('Key').split('/')[(-1)]
        value = leaf.get('Value')
        if (image not in templates):
            templates[image] = {}
        templates[image][param] = value
    return templates
