Fix only inlining first image. Other improvements.

- Add compatibility for browserify.
- Fix inlining of images so all the images are converted to dataURIs rather than just the first.
- Add add and expose svgAsDataUri function.