Only append 'gri' if it is not already the file extension.