Update detect

Simplify the detect script and check for composer.json as the first file as most projects would have a composer file and a webroot directory instead of inline index.php.
Merge pull request #14 from henrikbjorn/patch-2

Update detect