python/lib/gen_external.py: use os.path.join