permissions update
changed a bit the way pattern attributes are matched
make flags and item attributes case insensitive