Fix bug with scanning compound assets
Simplify directory determination