Added check for file existance

This raises an exception when a user wants to embed base64 encoded image (File name too long - data:image/png;base64,iVBORw0KGgoAA...) into a page (to view in CI).