Read settings from env variables
Detect mercurial in the PATH variable before falling back to default path.
Fixes #286