Update write_cache function

no empty cache files should be generated if SteamAPI times out
Merge pull request #5 from Conradowatz/patch-1

Update write_cache function