fix #8698: cp(src,dst) should truncate dst if it already exists

See #8698: `cp` was opening its destination file with `JL_O_CREAT | JL_O_RDWR`, when it should have used `JL_O_CREAT | JL_O_TRUNC | JL_O_WRONLY`.
I'm not sure what these `S_I*` flags mean, but shouldn't it get the mode from the source file?