The unfortunate truth is that some of these dictators and their military was all that was keeping their countries from turning into bastions of religious intolerance. To a zealot anything is an offense and any offense is an excuse.
Egypt isn't exactly improving, if anything they are moving backwards at the hands of religious zealots. Algeria is in a better state as its government is still in place.
Iran ended up going Islamist after a monarchy installed by the US and Britain, unseating a democratically elected government, failed. Hopefully Libya won't go that way, but wouldn't be that surprising.