Use `env()` to fetch the `PATH` environment variable.
On Windows based systems the variable is named `Path`, making it
inaccessible via `$_SERVER['PATH']`.
Avoid the possibility of treating a dir named `composer` as a file.
In case a path in the `PATH` environment variable contains a directory
named `composer`, it might be use as the alleged composer "executable"
as `file_exists` returns `true` for directories.
Merge pull request #3687 from ndm2/3.0-project-task-fix

3.0 - Project Task - Fixes and windows compatibility