%_extension% as well as %_bits_per_sample% and %_sample_rate% are special variables for attributes of the audio file and as this are not available in the scripting. The scripting is applied to data loaded from MB on the right and there are no files available at that time.
Use the $upper(%_extension%) directly in you naming script.
To show 96 instead of 96000 for the sample rate, try