'Returns the path to <IfMod mod> and creates one if it doesn\'t exist.
:param str aug_conf_path: Augeas configuration path
:param str mod: module ie. mod_ssl.c'

def _get_ifmod(self, aug_conf_path, mod):

    if_mods = self.aug.match(("%s/IfModule/*[self::arg='%s']" % (aug_conf_path, mod)))
    if (len(if_mods) == 0):
        self.aug.set(('%s/IfModule[last()    +    1]' % aug_conf_path), '')
        self.aug.set(('%s/IfModule[last()]/arg' % aug_conf_path), mod)
        if_mods = self.aug.match(("%s/IfModule/*[self::arg='%s']" % (aug_conf_path, mod)))
    return if_mods[0][:(len(if_mods[0]) - 3)]
