I tested this using a couple of random txt files. I confirmed the problem on very short txt files. But it works when I add more content to the file. So this problem might be related to the length of the file.
I started by testing "test.txt" which contained only the 4 character word, "test". It gave me an error when trying to upload that file. Then I added several more lines to the file and it worked.
The "htaccess.txt" file worked fine.
Also note that the attachment system allowed me to upload the same file twice (htaccess.txt). A duplicate check might be a good idea.
Firefox 3.6.8
Mac OS X 10.6.4