Fix finding a composer executable

This patch makes the following improvements for finding a composer
executable:
1. The check if composer is available on the executable path should
check the exit code instead of the output. The assumption that the
output will be empty if there is no executable is wrong. Checking the
exit code is more reliable.
2. The usage of file_put_contents() to download composer.phar was wrong.
Instead of downloading the composer.phar, a text file with the download
URL was created. This is now fixed.
3. The patch makes sure that the downloaded composer.phar will be
executable on UNIX systems.
4. The getComposerExecutable() method now returns the full path of the
downloaded or existing composer.phar, which makes it executable on UNIX
systems too. Just 'composer.phar' cannot execute the file from the
current directory. It must be at least './composer.phar'.
5. The error message if composer fails now includes the exit code and
the last line of the output.
Merge pull request #17 from kaloyan-raev/find-composer

Fix finding a composer executable