chg: add fchdirx as a utility function
As part of the series to support long socket paths, we need to use fchdir and
check its result in several places. Make it a utility function.
init repo $ hg init foo $ cd fooill-formed config $ hg status $ echo '=brokenconfig' >> $HGRCPATH $ hg status hg: parse error at * (glob) [255]