You're assuming that machines will always be automatons that are incapable of making their own decisions.  For now you're right but who's to say that somewhere down the road we won't see a machine that is capable of independent thought?

And as Taiwan has already pointed out, if a malevolent programmer designs a machine that's intended to do harm it doesn't necessarily have to be capable of independent thought - only of carrying out it's pre-programmed instruction - add some sort of automated repair facility and self-replicating ability and voila, you've got something that's pretty much indistinguishable from a metal and silicon based life form.