Fix EPERM error on Windows with A/V software

On Windows machines with anti-virus software, renaming immediately after
extracting fails due to an EPERM error. This is caused by the A/V locking up
files while it is scanning them, thus disabling renaming. The solution is to
re-try renaming until the EPERM error stops occurring, which happens after
the A/V stops scanning the files.