IMHO, what Kim is trying to do is goad the US into attacking North Korea, thereby giving him a reason to actually use the few nukes that he possesses, and that's if he has the resources to even make more. North Korea is hitting a very crucial period--Kim knows at some instinctual level that even though North Koreans have become as close to fanatical androids as decades of brainwashing can make them, society will eventually break down if they can't eat. Even China and Russia are backing away slowly, and North Korea can't survive without their aid. The economy is in utter shambles, and only massive food aid shipments and diverting huge numbers of military troops to farming in the last ten years has saved North Korea from mass starvation.
This is a last-ditch attempt by that paranoid nutball Kim Jong-il to intimidate his neighbors into thinking they'd better cave in and grant North Korea international status above the current level of "Typhoid Mary". If the US or UN attacks North Korea, it's just playing right into Kim's hands. First of all, you've got a fanatically trained military that will be a much tougher nut to crack than Iraq's military, then you've got 25 million North Koreans who have never been told anything other then Kim Il-Sung or Kim Jong-il propaganda. Remember, one of the reasons the US decided to nuke Hiroshima and Nagasaki was that they estimated 500,000 to 1,000,000 US casualties would result in trying to invade the Japanese home islands, because they knew the Japanese would resist to the last man, woman and child and were determined to take as many enemy lives with them as possible. That's exactly the way the North Koreans would respond to an invasion.
Just embargo the place. No trade, no aid. From anywhere. 2-3 years, starvation will have done a lot better job of eliminating North Korea as a threat than any invading army could.
Be considerate to others or I will bite your torso and give you a disease!