Better errors when cache dir is not writable; fixed examples cache dir.