[BUGFIX] Fix composer manifest detection
The method findComposerManifestPaths() would return wrong results if
the list of found JSON files was in the "wrong" order. Adding a call to
asort() makes the longer paths come later in the list and fixes the
Also the direct detection of a manifest is fixed and a useless
condition is removed.