I respect your achievements on connecting the MP3Gain commandline tool with Mp3tag.
But ... for some people it looks rather complicated ... and I always do not recommend MP3Gain, because it works with the mp3 files on a destructive base by modifying the mp3 data stream, that means the MD5AUDIO checksum will be changed.
I use Mp3tag tools to apply non destructive Replay Gain this way ...
Use foobar tools within Mp3tag?
... and doing so I have instantly all Replay Gain options at hand, which are provided by foobar, since version 1.1.6 with precise quality, following the EBU R 128 standard for loudness normalisation.
DD.20121221.1840.CET
I did a quick test using mp3gain.exe version 1.5.2 with one mp3 file ... and sorry, I have to correct:
The MD5AUDIO hash seems not to be touched when applying "mp3gain.exe /k /s i" against the mp3 file.
But the CRC32 hash and the overall MD5 hash has been changed ...
... surely due to the inserted tag-field "MP3GAIN_MINMAX".
DD.20121222.1134.CET