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.
from __future__ import absolute_importimport pkgutil__path__ = pkgutil.extend_path(__path__, __name__)