This fixes lints for tests/tests.rs and adds a test for rename. The new
rename test is based on the rename_no_replace tests. There are two
discrepancies between Linux and Redox but I'm not sure if they matter. I
added a note to those tests.
There are two fixed lints of note.
* assert_cmd deprecated Command::cargo_bin in favor of a compile time
checked macro.
* The mode literals were wrong: 0666 instead of 0o666. 0o is the prefix
for octal literals.
RENAME_NO_REPLACE is a neat flag for renameat2 which disallows renaming
a source onto an existing target.
I originally implemented this flag in relibc, but that code is still
subject to TOCTOU because the sequence of checking if the target exists
and the actual rename isn't atomic.
The code for the flag isn't used anywhere yet, like frename, but it's
unit tested and works for now.