Make loading images sync in the parser case, and make selecting an image async in the scripted case. Fixes #152 Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=25848
Address my own review comments
Whitespace fix
Merge pull request #179 from zcorpan/fix-152

Make loading images sync in the parser case, and make selecting an image...