Replace shellcmd calls with copy_file and perl's unlink.
Replace shellcmd calls with copy_file.