Fix bug, when there was no temp/cache directiry
Fix endless caching bug