Dogs track their targets in such a way when they're running at you that you can generally trick them by quickly changing your pace. For instance, if you notice a dog that's about to charge you, slow just a tad and maintain a relatively cool even pace as it's charging you (the dog compensates for where he think you'll be at that speed), and as it gets to within 15 feet of you, sprint. You'll gain all the needed ground to avoid it.
If that fails a swift kick in the shoulder blades will send it down and, if hard enough he won't get back up to chase you.