preserve ownership and permissions of existing file

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>