Update ComposerPathFinder.php

A follow-up to my previous request, thanks to @Seldaek
[fix] Clean up the ```ComposerPathFinder::isPackageInstalled()``` ```foreach``` part