moved resolve_glob out of the main lib