Fixed bug with async catalog download

When no local libraries.json was located, the download from github was
async which made download of individual libraries fail.