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

Fixes #4079

The `file.rename` state should now work properly with files, directories, or symlinks.  When symlinks are moved, the old link is removed, and a new link is created pointing to the same location, rather than moving the files it links to.