Fixed rename error in Windows

Fixed error 183 (File already exists) when trying to rename img.tmp to
img in Windows when using pngnq.