creates cache and session directories