removed string stripping and added smarter regex code
convert generated svg to png within python