Fix fnmatch

fnmatch does not accept regular expressions as presumed in
0c4851e43608ace7c5c6243486a8eb516619c75e See
http://docs.python.org/2/library/fnmatch.html

This patch actually completely broke tagging. All we need to do is make
sure any [ or ] used is conbverted into [[] or []].

Fixes #2557