added Filetypes.extensionFor(s) function and fixed the tests