avast! should not delete any attachment without letting you know about it (at least in the default configurations) - and it certainly should delete only attachments identified as infected. If your .txt attachments are deleted, it may have two reasons:

  1. there may be a bug in avast! - what version (build) are you using? Did you update to the latest version (build 289)?
  2. the attachments are deleted by “somebody else” - what e-mail program are you using?