Fixed some issues in Cache::save() Cache::restore() so it works better on windows.