Add endswithsep() and use it instead of using os.sep and os.altsep directly.
This change is intended to allow hooking endswithsep() by win32mbcs
extension for MBCS support.
To run the tests, do:cd tests/python run-tests.pySee http://www.selenic.com/mercurial/wiki/index.cgi/WritingTests formore information on writing tests.