Use `Filesystem::chmod` instead of `chmod` when dumping file

This adds consistency as discussed in https://github.com/symfony/symfony/commit/ca5eea5c1922688685d104f962bc5d16626ce05d#commitcomment-5804089
minor #10590 [2.3] Use `Filesystem::chmod` instead of `chmod` when dumping file (romainneutron)

This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Use `Filesystem::chmod` instead of `chmod` when dumping file

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

This adds consistency as discussed in https://github.com/symfony/symfony/commit/ca5eea5c1922688685d104f962bc5d16626ce05d#commitcomment-5804089

Commits
-------

c2ffefd Use `Filesystem::chmod` instead of `chmod` when dumping file