Check for exists() rather than isfile(), and remove dest if force
Make new link in case of links, otherwise move
Use lexists instead of exists (includes broken symbolic links)
Unlink source after creating new link
Merge pull request #4214 from basepi/renamefix4079

Fix file.rename so it works with files, dirs, and links