Consolidated pyeuclid patching code into path_euclid.py