MDLSITE-2699 replace path the one being checked.

Before this change, the script was returning paths
belonging to the moodle site containing the local_ci
plugin, instead of paths of the git repo being checked.

This only was affecting 2.5 and previous, because for those
versions is when we need the real site. For 2.6 and upwards
getting components can happen without any site installed.