init: use read_file and write_file to implement do_copy builtin
am: 246e3c4c7c

Change-Id: I506de86906dfef49672e406fd28df051e3133458