When stage.toDataUrl fails, call fallback function

It was impossible to know if toDataUrl call fails due to SECURITY_ERR exception (same origin policy).

In my school exercise, sometimes user could add images from flickr into to the stage. I need stage saving to happen even though rendering image of the stage would fail.

I thought this addition could be useful for the project. Please feel free to use these changes in a way you wish.

Consider of changing the callbacks name `fallback` to something better.