You should also add that around 100 nuclear power plants (in the US) have to survive such an event. If they are not going to survive it then you have to prevent your opponent from taking over your country or provide some credible deterrent while you have not sunken into chaos yet, i.e. with some nuclear assault.
I have strong doubts that anybody openly just starts an EMP attack and then does nothing (apart from the sun), I would rather expect this to happen after some conventional warfare has not yielded results and a nuclear attack is next on the list (the one out of Kahns book).
Given that previous high altitude tests all used fairly large yields in the 100kt to Mt range I would doubt that terrorists would be able to pull this of credibly. Assuming some conventional conflict is already taking place I would think that the countries involved would have some time to prepare for nuclear escalation. Also there is some chance that your economy will have tanked some time before hostilities break out, just because the global economy might have fallen apart that provides access to foreign resources. So from that end I would rather expect some slide into disaster instead of some catastrophic event.
Actually I would rather worry about net energy decline and climate change since those issues will kill more people with greater certainty and in agonizingly slow motion.