- Fix case where the source is - and the target exists.
- Only call chflags() (to remove flags that might prevent us from replacing an existing target) in the exists case; otherwise, to_sb.st_flags is uninitialized.
- Rename the source file in the stdin test case.
- Extend null and stdin test cases to cover the case where the target already exists.
PR: 297681
MFC after: 1 week
Fixes: d34870708db9 ("install: Allow installing stdin")