Updated build script, fixes to client for gevent, patch to hgdistver