Add mercurial to isDevVersion

also detect .hg directory to detect developer mode with Mercurial (patch is based on and includes .hgignore patch)