- switched the patter and input of $filter into the right places - added pattern wildcard to MSYS_NT & CYGWIN_NT as they change with windows versions - correctly identify MSYS2, even in an env like MINGW64