When it comes to running a country, non-hereditary dictators already have among the worst incentives. They are there to get what they can from their country while they still have control. They are going to be more short term oriented than a monarchy and much less responsive to the immediate well being of the people than a democracy. When it looks like they might lose control their incentives are even worse.
The recent news about Mubarak sends a powerful message to dictators. "Don't publicly kill your citizens. Don't enrich yourself too much at their expense. But if you have already done these things, you might as well fight to the death of your citizens and yourselves because it isn't likely that there will be a safe way for you to give up power."These people have done horrible things, and from Egypt's perspective this prosecution makes a lot of sense. It attempts to quell the recent surge in unrest by bringing people who have done very bad things to justice.
But if Mubarak, a leader who voluntary stepped down, is being treated like this then other dictators are going to think twice before following his lead. They have very little incentive to surrender. Assad and Gaddafi probably don't see any way out at this point*, so they have no choice but to dig in. In Yemen Ali Abdullah Saleh might have changed his mind because he wanted to keep power over the promise of immunity, but it is also possible that he didn't think that he would have real immunity.
Before extending this simplistic analysis too far it should be noted that many dictators are crazy and won't always respond to changes in incentives (and even if they were sane, one particular person will not always respond significantly to a change in incentives). Still, systemic policies that stack the deck further against a good outcome are not desirable.
We can just be thankful that none of these misaligned incentives are immediately significant in the countries run by dictators who have nuclear weapons.
*At this point it is questionable whether they should even be offered a way out. Preventing future bloodshed needs to be weighed against bringing past wrongs to justice.