grok: Further improvements.

pattern_directory() works now, pattern() renamed to match(),
added tagging, but it doesn't work yet.