[fix] findmanifest should prioritize main folder manifests

Actually the findManifest function looks for manifests in the parent folder and in first level subfolders. 

This example structure:

->fof
--->fof.xml
-libraries
-manifies.xml

Will return the fof.xml manifiest.

This fix ensures that the function prioritises the main folder manifiests. I would like to remove the subfolder check but kept it for B/C reasons.