SVG graph support

I did two commits for this. The first commit adds svg graph support following the code as it was. The second tries to substitute the hard coded extensions for global variables in app.php script.

The first commit looks good and seems to work with the testing I dad, the second also works but seems a bit more invasive and I'm not that satisfied with having to create two variables, so I figured I'd share the code before doing anything else.