Some hidden files or folders will generate the "detritus" error. Apple's documentation doesn't mention hidden files developer.apple.com/qa1940, removing hidden files can solve this issue.
Placing files in the root of an application bundle goes against Apple's Bundle Programming guidelines, some versions of code sign will refuse to sign an application bundle if files are present here.
Mac Application bundles have required items, see Apple's Bundle Programming guidelines and App Wrapper cannot find one.
Generally this is because the name case doesn't match the requirements, this issue can be hard to track down on a case-insensitive system, but causes many failures on case-sensitive systems.