Use short paths on Windows.
Fix image path for Windows.
Escape the "\" in regexp.