My experience is that if you approach a squirrel quickly, it run towards you or dart right in front of you. My guess is that the squirrel thinks you're a predator and the squirrel generally can not out run animals larger than it; it's survival tactic is to out maneuver you by running towards you. Since you're not hunting squirrels, the best way to avoid them is to simply slow down and watch them dart across you.