Can't submit add-on XPI

When I try to submit my add-on, it says “install.rdf” is missing, yet it clearly is right there in the file. This error only occurs when I try to submit an XPI file with all the hidden system files (such as .DS_Store) are removed. If I try to submit an XPI that still has the hidden system files, AMO accepts it. Something similar also happened when I was testing the add-on. If I package it with the hidden files, it installs. If I remove the hidden files, Firefox says the add-on is corrupt. This seems strange to me, because aren’t you supposed to remove those hidden system files? And what’s up with the error?

Could you post accepted and rejected XPI files, respectively?