Rewrite of the path/road generation algorithm to work with arbitrary roads.

Also fixed the minor bug where it didn't build.