I think the future might be more like Isac Asimov meets aliens, where machines are out there surviving extremes of space along with humans, moving towards some common goals.
Oh, that's a scary thought. Not only would they be extremely fast thinking, intelligent, and powerful, but also occasionally insane.
Instead of Terminator, we might be facing a classic "Captain Kirk vs Computer" scenario. Hopefully we'll be able to defeat them with simple logic puzzles too.
To put it into human terms, imagine that the nerves in your spinal column came out the back of your neck, dangled down to a briefcase that you had to carry all of the time, and then reentered your body through your hand. You'd do everything you could to protect that nerve bundle.
If the machines see us as a threat to their power systems, they would probably do something about it that we may not like. I doubt they'd try to turn us into Matrix-style batteries, but they might counter-threaten us with extermination. To avoid that, we'd have to make sure that providing power to them is in our best interest as well, so that our goals are aligned and we can be allies instead of enemies.
And that's perhaps the reason we might not see 'hostile' AIs the way popularly imagined, unless we explicitly went about designing them that way.
[EDIT for more depth] If thinking is emergent, we'll eventually make a machine that thinks. Unless you think we have imbued it with a soul, there you will have an example of a materialistic basis for thinking. As a side effect of showing a materialistic basis for thinking it will probably also overturn a lot of psychology, and demonstrate that how we think we think, and even what we think we think is wrong.
I am an anti-materialist and I think machines can almost certainly be made to exhibit general intelligence, and possibly even (I am not sure about this) to achieve "really real" thinking a la consciousness and self awareness. I don't see either of those eventualities to be in conflict with my anti-materialism.
However, the fear of superintelligent machines with goals that are not our goals simply eliminating us because we're made of atoms they can use for something else... is very well-grounded.
A superhuman machine intelligence would have no genes, no body, no fear of biological death. It seems obvious that a key challenge will be to recognize whether a machine is thinking because it is extraordinarily unlikely it will think like we do.
Our fear of super-intelligent machines may be a result of projecting human psychology onto machines. It is not likely they will work that way.