Previously accessing the extension needed to ensure an extension on an empty path. This conflicted with DEBUG_STRSIZE as it was assumed the input was FILE_MAX, where as it was a small buffer with RNA, see: !107602. Resolve by separating the function that ensures the extension with the function that finds valid extensions for a format. Also pass the size of the filepath to functions that ensure the extension.