This is not a safe way to check for the right file extension. Use the `ends_with` function instead (it's in utils.h). I don't think we bother with the case conversion in the other places we check file extensions, but I won't ask you to remove it... we should probably add a case-insensitive version of `ends_with` to make this easier, but that can wait for some other PR.