Move handling of Windows globbing out of upstream code