Pathname#write: don't check ARGV.force?

Closes #21390.
Check deps of satisfied deps
Handle optional build-time deps correctly