Use os.sep.join instead of os.path.join to avoid startswith calls.