Calculate whether the file ends in the extension