Fix hg_dirty_choose function and add mercurial support for DISABLE_UNTRACKED_FILES_DIRTY

The grep in hg_dirty_choose never had results as it didn't match the whole line meaning repos were always clean.