Why is my foot mesh moving out of place when rigging?
everything is fine with the rig, but the Knee IK.L (pole target) bone is the child of some bone in the IK chain. If you parent it to main bone things look much better.
If it still doesn't work, see the blend file attached ( http://www.pasteall.org/blend/41604 ).