Merge some file writing extension checks from OpenJK.

Thanks Ensiform.
https://github.com/JACoders/OpenJK/commit/05928a57f9e4aae15a3bd0
https://github.com/JACoders/OpenJK/commit/ef124fd0fc48af164581176
void Com_WriteConfiguration( void ) {
#if !defined(DEDICATED) && !defined(STANDALONE)
	cvar_t	*fs;
#endif
	if ( !com_fullyInitialized ) {
		return;
	}

	if ( !(cvar_modifiedFlags & CVAR_ARCHIVE ) ) {
		return;
	}
	cvar_modifiedFlags &= ~CVAR_ARCHIVE;

	Com_WriteConfigToFile( Q3CONFIG_CFG );

#if !defined(DEDICATED) && !defined(STANDALONE)
	fs = Cvar_Get ("fs_game", "", CVAR_INIT|CVAR_SYSTEMINFO );

	if(!com_standalone->integer)
	{
		if (UI_usesUniqueCDKey() && fs && fs->string[0] != 0) {
			Com_WriteCDKey( fs->string, &cl_cdkey[16] );
		} else {
			Com_WriteCDKey( BASEGAME, cl_cdkey );
		}
	}
#endif
}

void Com_WriteConfiguration( void ) {
#if !defined(DEDICATED) && !defined(STANDALONE)
	cvar_t	*fs;
#endif
	if ( !com_fullyInitialized ) {
		return;
	}

	if ( !(cvar_modifiedFlags & CVAR_ARCHIVE ) ) {
		return;
	}
	cvar_modifiedFlags &= ~CVAR_ARCHIVE;

	Com_WriteConfigToFile( Q3CONFIG_CFG );

#if !defined(DEDICATED) && !defined(STANDALONE)
	fs = Cvar_Get ("fs_game", "", CVAR_INIT|CVAR_SYSTEMINFO );

	if(!com_standalone->integer)
	{
		if (UI_usesUniqueCDKey() && fs && fs->string[0] != 0) {
			Com_WriteCDKey( fs->string, &cl_cdkey[16] );
		} else {
			Com_WriteCDKey( BASEGAME, cl_cdkey );
		}
	}
#endif
}
