Update ComposerPathFinder.php

[fix] Clean up the ```ComposerPathFinder::isPackageInstalled()``` ```foreach``` part