A nice, thorough (free access) peer reviewed paper here:
http://www.pnas.org/content/111/52/18490.full.pdf
They separately analyze and compare the air pollution (PM2.5, O3), climate impacts (CO2) and mining costs associated with all alternative fueled light vehicles.
Bottom line: Compared to gasoline in a conventional ICE engine, ethanol in an ICE or an EV running on 'grid average' US power both reduce total CO2 slightly, but have net positive damage to the environment. Both are better re the future climate (since CO2 sticks around for centuries), but worse for kids with asthma (O3) or that guy with the bad ticker (PM2.5) in 2015.
The increases for EVs are almost entirely driven by coal mining and plant emissions. EV do better on both metrics than gasoline on a gas-fired grid, on a nuke grid (presumably, not considered), or with wind water or solar (WWS) powered grids.
RE the batteries: these authors state that earlier researchers had sited all battery material mining emissions at the auto manufacturing plant (with dense population) rather than the actual mining site (in a remote area) and thus significantly over-estimated the effect on human health. Where the pollution is emitted matters.
Some stats:
-- 40% of EV owners have their own PV installed. (for a Hearth example, Begreen and his Volt EV)
-- >60% of US EVs are on the west coast, with very low carbon electricity (gas, hydro, wind and solar) that are great for EVs
-- The US grid is getting cleaner (both PM2.5 and CO2) faster than gasoline mpg is inceasing, and has much more potential to do that in the future.
-- US balance of trade is also a benefit...EVs use US-produced power, reducing US imports of petroleum.
Myself, I find that my local grid is somewhat cleaner than the US grid average (due to PA nukes), but buy wind power for the very reasons in this thread. The debatable factor is that I count CO2 as worse than PM2.5, so I would still choose an EV if wind was not available.