One concern that no one has mentioned yet:
Error Checking:
- Check to make sure you're not going to clobber an existing file or directory
- Is the file that is renamable movable?
- Is the directory that you'll be working in writable?
- etc...
Check your results and what you're planning to do, otherwise you might have some tedious devugging to do.