From the use-site, I see that you are supposed to call this like: `hasExtension(f, ".pdf")`. We might want to make this explicit.