refactor rename to reuse for move

We also need to provide an alternative to File::Copy's `move` function
(which is a `rename` with a fallback on a `copy`).  Note that File::Copy
has different permission modes: `cp` preserves permissions while `copy`
does not.  However, both `mv` and `move` attempt a `rename` which does
preserve permissions.
fix move_file still using File::Copy directly
add renamex and movex that throw exceptions