This is actually because most of the time when I use a function like this it's not on an actual file or on a file that is reachable by pathinfo. That's the problem with the actual `File::extension` method, if you're not doing it on the full path it doesn't work.