Handle no network when refreshing caches

I've fixed problem with updating caches without internet connection. Application now shows dialog window with error message, instead of "updating" caches.

Fixes #708.