consistency: use util.realpath instead of os.path.realpath where useful
exceptions:
hg: os.path.realpath used before util can be imported
tests/run-tests.py: may not import mercurial modules
keyword: use util.realpath instead of os.path.realpath
This makes test-keyword.t pass on Python 2.4.1 (e.g. Debian sarge)
posix: workaround for os.path.realpath bug in Python 2.4.1 and before
os.path.realpath didn't resolve symlinks that were the first component of
the path, see http://bugs.python.org/
issue1213894