Fix windows rename of temporary files