'Determine actions to take with a new augeas path
This helper function will return a tuple that defines
if we should try to append the new filepath to augeas
parser paths, and / or remove the old one with more
narrow matching.
:param str filepath: filepath to check the actions for'

def _check_path_actions(self, filepath):

    try:
        new_file_match = os.path.basename(filepath)
        existing_matches = self.parser_paths[os.path.dirname(filepath)]
        if ('*' in existing_matches):
            use_new = False
        else:
            use_new = True
        if (new_file_match == '*'):
            remove_old = True
        else:
            remove_old = False
    except KeyError:
        use_new = True
        remove_old = False
    return (use_new, remove_old)
