Fix for "temp" dir being deleted during encoding

I was doing flac -> mp3 encoding and noticed that the temp dir that contains the encoded mp3 files was being deleted before being moved to the parent folder.  I changed the code so that the temp dir isn't deleted until AFTER the files are renamed.