Fix SVG saving, adds output tests