To protect your programs from blocking, try to digitally sign your code, I'd recommend you use Thawte, it has well-recognized certificates which are not really too expensive (starting from 100 € / year).
It works almost for all the situations, but sometimes there could be some cases when you just can't sign a code. Try to contact with Avast, if everything's OK they will add you to a whitelist within a few hours.
Also, I'd recommend you to use a little trick: creat a separate version of your program with a function that is supposed to be 'dangerous'. It will avoid you from re-submitting for the whitelist after the future changes to your program.