Im not working on that part of the application plus this only occurs on my development box and the app is used under windows xp which defaults to c:\windows\temp for the temp directory.
No, XP's user default is NOT c:\windows\temp. TEMP and TMP for a
user are set to %SystemDrive%\Documents and Settings\{username}\Local Settings\Temp by default. If this is not the case, it has been changed, and it should NOT be changed to be the same as the
system variable which IS %systemroot%\temp.
User and System variables are two different things and you should not confuse them and avoid making them the same.
If you've been mucking around with your variables on your development box to try and replicate how you think XP works, you've been mislead. Please sort out or show what your dev's user environment variables are, we can't help you as accurately as we'd like to as you've left a lot of questions unanswered. On your dev Windows 10 box, the user default location I'm sure should be %SystemDrive%\Users\{username}\AppData\Local\Temp.
How certain are you they have hard-coded c:\Windows\Temp into the code? This is REALLY bad programming for modern Windows, and you should prompt them to change it or it can't be classed at truly XP (or newer) compatible.
Avast does not seem to be the root-cause problem here and I can't imagine how many other compatibility problems your program might run into with other 3rd party apps.