Make sure the given attributes are deleted from the file/directory

    name
        The path to the file/directory

    attributes
        The attributes that should be removed from the file/directory, this is accepted as
        an array.

def delete(name, attributes):
    '''
    Make sure the given attributes are deleted from the file/directory

    name
        The path to the file/directory

    attributes
        The attributes that should be removed from the file/directory, this is accepted as
        an array.
    '''
    ret = {'name': name,
           'result': True,
           'comment': '',
           'changes': {}}

    if not os.path.exists(name):
        ret['result'] = False
        ret['comment'] = "File or directory doesn't exist"
        return ret

    current_attrs = __salt__['xattr.list'](name)
    current_ids = current_attrs.keys()

    for attr in attributes:

        if attr in current_ids:
            __salt__['xattr.delete'](name, attr)
            ret['changes'][attr] = 'delete'

    if not ret['changes']:
        ret['comment'] = 'All attributes were already deleted.'

    return ret