Using minimatch for converting glob to regex instead of my own method. Made xpath selectors work.