file_replace preserves permissions from the old file