Edit book: Fix file permissions for the edited book being changed on Linux and OS X

Since the editor saves by using a temp file and then renaming the temp
file to overwrite the original, we have to explicitly copy over
permissions and owner metadata to the temp file to ensure they remain
unchanged.