http://scriptographer.org/tutorials/paths/working-with-path-items/
In the example about inserting segments in relation to already existing segments there is a missing ")" line 6
Thanks - fixed.