Clean up the template tags for #11

If a template is in a subfolder then WordPress will generate a class with the folder name and a slash: `folder/filename` so I added an extra regex to strip the `/` and anything before it too.