Call Composer directly instead of using the wrapper
We don't need to ping getcomposer.org any longer
Remove cache directory check as that was only for the wrapper
Move ping down
Set extend as "offline" if composer.json is not writable