Handle dir lock while executing mercurial command on windows