Fix windows based paths.

This modifications fix the use of regex with glob on windows.