dumpstate: refine file copy and tar logic

Originally dumpstate copies files by calling /vendor/bin/cp with execvp.
We are seeing some stuck issues while copying files and taring files.
Change is to copy and tar files in place instead of calling system shell.

Bug: 169465773

Change-Id: I9878bde8e540d41c1b498c841079af38f4ec502c
1 file changed