Fix permissions on ADD/COPY

Fix a regression introduced in #9467 when a single file was added or copied. Thanks to @cyphar for bringing that up on #docker-dev!