Fix image path slash cleaning.

Image dimensions now work on Windows when
doc_root isn't set.

Fixes #140