ingest: copy registry file protection flags

A tempfile is opened with mode 600, so update with the desired
mode from the existing registry.