Check for contao and artifact repository.
Fixes ContaoCommunityAlliance/Composer#78, do not use $this in closure.