With the holes in Asimov's Three Laws (assuming your nanites followed them), wouldn't nanites be just as bad as a mutated virus?
"I'm sorry, Dave, but I'm afraid I can't let you digest that." *hork*
*ahem - enters physics mode*
Nanotechnology hasn't yet evolved to the point where you can have nano-robots in one's bloodstream, doing something they were "programmed" to do. What you can have, though, are specifically designed molecules or structures (eg carbon nano-tubes) that react in a certain way when presented with a certain stimulus. Thus, if one could find a combination of elements in a specific structure that reacted with a virus to make the virus harmless, it would be perfect, as it would do that and only that - no thinking or programming or whatever involved. Definitely none of Asimov's Laws of Robotics.
To make a robot on the scale of viruses, that is fully functional and indeed, super-computer scale in processing ability, which is what would be needed for something like this, we would first have to perfect quantum computing, and that stuff is waaaaay off at the minute.