Cleanup: Remove duplicate file copy code.

Fixes bug 1160548.

Just a small cleanup to take advantage of code reuse.

Change-Id: I6b362335d555a3e384fa8778fcc85cbbdc061fd1