only escape glob pattern

This will hopefully fix #3345 

Would be great is some people with a windows server can give it a try... cc @DeepDiver1975 @butonic  ;-)