Much improved glob implementation.