Set permissions when creating .bak file

When opening the .bak file, truncate to 0 length if it already exists,
or create with the following permissions if it doesn't exist:
  * reading and writing by the owner
  * reading only by group members and others

Fixes compiler error on x86.
TEST=builds clean for x86-generic, arm & x86_64

Change-Id: Iaface75c8f78d4b7e36c50d677fc452297eebeb0
1 file changed