Automatically select correct type of graphics based on output filename.
Change lm -> glm in order to employ binomial family.
Improve behaviour of knot deletion; switch plotting to glm; playing around to get the plot looking right.