Fix permissions on ADD/COPY

Fix a regression introduced in #9467 when a single file was added or copied.