jabeck, your problem is with cyclic dependencies. Basically, the problem is that you have the chain length of the IK constraint for the knee set to 0 (which means infinite, so it will affect knee’s parent and the parent’s parent, etc.) I don’t know the specific cyclic dependency this creates, but in essence it means that A depends on B which depends on C which depends on A, so it is impossible to tell how any of them should move (things spaz out like you’ve seen.) You can fix it in your case by setting the knee IK chain length to 1 which is obviously what you’d want to do (actually I don’t even think you need this IK constraint.)
And just a few things to improve your leg rig, take them or leave them. First the IK constraint on the knee is unnecessary, I would remove it. Second the locked track constraint, I think, should be on the upper leg instead of the lower leg. Third, an IK pole target is clearly what you want to use instead of the locked track constraint. The pole target is made for this sort of thing (pointing joints the correct direction) and maybe the reason it is not in your tutorial is because it is relatively new. Trust me it makes it much easier to work with.
I’ve attached a blend file with the improvements I described. On the left leg, I fixed it up still using the locked track constraint, and on the right leg, I’ve used a pole target instead. Hopefully you can see how it works, it’s really not too hard.
Hope that helps!
hank_for_rigging_2_fixed.blend (263 KB)