fixes #28 and yihui/knitr#544: should decode image URL before checking if the file exists

e.g. `foo bar.png` will be `foo%20bar.png` in src after markdownToHTML(), but we really need to use restore the URL
Merge pull request #29 from yihui/master

fix the image encoding problem