Use tklgit.json to get repo list if marketplace is not configured
Adjust logging setup so that it can be called earlier

This is necessary to get logging configured by the time we fetch repos from the
marketplace.