I think it's another case of modern science inflating it's own abilities Micky. If an asteroid or comet was small (a few hundred yards across) then it might be possible to affect it. However, it would have to be detected first, it's orbit or path calculated and then a vehicle launched to intecept. Think of the accuracy needed there! Deep Impact hit Comet Tuttle (I think it was) but most attempts to hit an approaching asteroid with a device large enough to alter it's course will surely miss. Missing by a quarter of a mile is the same as missing by a hundred miles. What about a 'rogue' asteroid or comet coming into the solar system from deep space? We'll only have afew days notice then! Comets dislodged from the Kuiper Belt or Oort Cloud don't always adopt lazy orbits or paths.
If an asteroid or comet is larger - say as large as the K/T impactor at Chixulub (6 miles across) - there's nothing we can do with modern technology. Mankind has to realise how vulnerable we are. Every species of human to walk the Earth has gone extinct, as has 99% of all species. Most of those extinctions were caused by catastrophic events and the Earth will be struck by an asteroid again in the future. Mankind may well disappear at that time, making way for other species to evolve and fill the niches we leave.
I hope I'm not considered pessimistic. I think I'm just being realistic.