A C# glob matcher, ported from Javascript