What generates the electricity? If battery powered vehicles have their charging electricity generated by a coal-burning power plant, and that electricity is then inefficiently transmitted to the vehicle over power lines, that's an awful lot of carbon dumped into the air just to power a vehicle.
Of course, the electricity doesn't necessarily have to come from coal, but it is more likely than you think. Most electric cars are charged at night when loads on the power grid are the lowest, and that means baseline generating stations like coal and nuclear.
I know environmentalists dream of all of our power coming from renewable sources, but a lot of renewable sources are not currently capable of being a baseline power source. Also renewables alone may not be enough to satisfy our entire electrical demand. Keep in mind that if we all start fueling our cars with electricity, electrical demand will skyrocket.