Fix checking $URL on Windows

Git Bash 3.1 (installed by msysgit) doesn't support =~ operator.
Neil suggested a work-around.

Change-Id: I14f3c2a7d3076d3e7bd829232572c25e8ee63ba1