If you do think avast is causing the problem, all you have to do is right-click the taskbar icon and say "Stop On-Access Protection" right before you start up the game, and then do the same to turn it back on when you're done playing. Quick and easy, and I do it every day. The only real risk of getting a virus this way is through automatic map downloads, but I'm not too worried about that.
On a slightly related note, just about every time I start up TF2, it loads normally and then suddenly decides to go minimizing-crazy. It acts like it's fighting with Windows for the screen, minimizing and maximizing itself like crazy until I do some deft Alt-Tabbing to right it. Anybody know what might be causing this? I suspect it's just some oddity with my graphics card or with Steam and Vista.