If Pakistan is unwilling or unable to afford Afghanistan a minimal level of respect for Afghanistan's sovereignty and borders, then it would be very difficult to find fault with Afghani troops that follow the terrorists back into Pakistan territory.
Will Smith (Men in Black) said it better: "If you don't start nothing, there won't be nothing."
While I understand what Karzai tries to say he is in no position to attack Pakistan - and consequently to demand anything. Pakistan on its own holds India back, and that is something; Afghanistan can't even defeat a bunch of Taliban guerillas on Afghan land, especially after the stunt 30 of them did in Kandahar a day or two ago.
Karzai only looks like a fool when he verbally threatens a state that is larger, better armed, and has a well functioning military - unlike his own. A better way would be to increase cooperation with Pakistan, and make it politically painful for Pakistan to do nothing against the Taliban. But threats ... Pakistani generals thrive on threats, they receive them from all their neighbors now.