Update pathgen.js

see last commit