glob to regex converter with unit tests