Update knotcalc.py

Should be free of bugs now.