Ahmadinejad has Fuck-You-Power (as in Fuck-You-Money) and he uses it. He doesn't need any Western government and doesn't care putting up with international sanctions. Whether he is doing good any good to his own country is another matter entirely.
I don't subscribe to the Western theory that Iran as a whole is a threat to anything. They see nuclear technology as both a mean to assert their military supremacy and as a way to overcome their energy issues so they go for it regardless of what other countries think of it. Right now, Nuclear weapons are still used by "strong" countries to impose their supremacy.
Look at Israel. That problem is unmanageable. I strongly believe that if Iran had Nuclear power, Israel would play much lower profile in the region and discuss equitably how to settle the issues over there.
A couple of things I wish to add: the balance of power must shift. Nobody likes living in a world that is biased toward a small group of "leading" countries. Nuclear power is like the instant disruption factor in the balance of power. An alternative is a slow and painful fight between countries such as what happens between Israel and their neighbouring countries.