use 'x in dict' instead of 'dict.has_key(x)'
"in" is faster, and has_key will be removed in py3k
churn:
issue833 was reintroduced in
9bc46d069a76, correct it and add a test
util: canonpath: simplify logic
if root == os.sep, then endswithsep(root) is True as well: one test is enough