Don't assume the badge is a PNG

When awarding badges, replace the extension with SVG if the URL extension is SVG

Badge upload dialog accepts both PNG and SVGs

Fixed bug causing tests to fail