Modified check for existence of hg binary to also work on windows