Hi JoeG: That's not entirely accurate. You can't really say
any organism is "perfect the way they were", including dinosaurs. They were mainifestly the dominant life-form on the planet for 150 million years or so, but they suffered the same kinds of population and species level extinctions that modern organisms do - meaning the "winning" lineages (those that were more or less adapted to their particular environments) survived, the "losers" didn't. Species of dinos came and went just like modern organisms. In addition, overall dino diversity appears to have been fading even before the Alvarez event that did in the remaining populations. One study I read showed (and I apologize that I don't have it under my fingers at the moment) showed on the order of 30 species of ceratopsids, for instance, about 10 million years pre-Alvarez, but only 11 at the boundary.
Speculation about what the dinos MIGHT have become if the remainder hadn't been wiped out is pretty pointless, except to say there was nothing preventing some smallish species lineage from ultimately developing recognizable intelligence - just like there was no particular reason why it should have (any more than there was a particular reason why mammals should have spawned a lineage that ultimately led to humans). The variables involved boggle the mind, honestly - but it could have happened. After all, the dinos radiated into just about every available niche, including the sea and the air, with lots of neat innovations to see them through.