resolves #612 generate data uri for remote image

- generate data uri for remote image when data-uri & allow-uri-read are set
- add content-type logic to test webserver
- minor optimizations
Merge pull request #1015 from mojavelinux/issue-612

resolves #612 generate data uri for remote image