Fixed issues with missing cache directories.