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`.