Svgtex connection error

Raising exception when Svgtex is not reachable. 

Also fixed svgtex encoding error when creating png image files.