Prevent auto update temp files from accumulating on errors.
Prevent auto update temp files from accumulating on errors.

This solves two semi-related issues with the handling of the temporary
files during the auto update process:

- The /tmp/freegeoip directory was being created when the process first
  started, but if that directory went away for any reason, then the auto
  update process would begin failing, since it couldn't rename the
  temporary downloaded file into a non-existent /tmp/freegeoip
  directory. This fixes that issue by ensuring the directory exists (and
  creates it if not) prior to each rename.
- If renaming the temporary data file failed to be renamed for any
  reason (for example, due to the missing directory issue above), then
  the temp files would begin to accumulate indefinitely. This could lead
  to your /tmp partition filling up. This fixes that issues by ensuring
  the temporary files are always destroyed if errors during the rename
  are encountered.

NickTaporuk/freegeoip,NickTaporuk/freegeoip,mcdelaney/freegeoip,bcbroussard/freegeoip,mcdelaney/freegeoip,stea4lth/freegeoip,btsantos/freegeoip,mavelar/freegeoip,Endika/freegeoip,pocket-playlab/freegeoip,thebakeryio/freegeoip,stea4lth/freegeoip,thebakeryio/freegeoip,mcdelaney/freegeoip,Endika/freegeoip,My-Sign/freegeoip,GhaziTriki/freegeoip,btsantos/freegeoip,thebakeryio/freegeoip,arnononline/freegeoip,Endika/freegeoip,NickTaporuk/freegeoip,My-Sign/freegeoip,Sweazer/freegeoip,mavelar/freegeoip,bcbroussard/freegeoip,Sweazer/freegeoip,danielstreit/freegeoip,GhaziTriki/freegeoip,mavelar/freegeoip,danielstreit/freegeoip,pocket-playlab/freegeoip,btsantos/freegeoip,danielstreit/freegeoip,bcbroussard/freegeoip,Sweazer/freegeoip,GhaziTriki/freegeoip,pocket-playlab/freegeoip,stea4lth/freegeoip,My-Sign/freegeoip