Add "%X" template variable for uppercase filename extension.

I'm not sure the code is actually ready to be merged in yet (e.g., I haven't actually tested it), but I figured I'd share so you'd have a chance to give feedback.