emclcd: fix copyfiles warnings, error handling. resource leak
emclcd: fix copyfiles warnings, error handling. resource leak

The only guess I have about why 'popen' was used instead of 'system'
is that it was desirable for the cp command to run without blocking
emclcd.  So instead of popen('...', 'w'), use system('... &').

narogon/linuxcnc,unseenlaser/machinekit,narogon/linuxcnc,kinsamanka/machinekit,unseenlaser/machinekit,ArcEye/MK-Qt5,unseenlaser/linuxcnc,jaguarcat79/ILC-with-LinuxCNC,bmwiedemann/linuxcnc-mirror,unseenlaser/machinekit,ArcEye/machinekit-testing,Cid427/machinekit,cdsteinkuehler/linuxcnc,araisrobo/machinekit,cnc-club/linuxcnc,araisrobo/machinekit,bobvanderlinden/machinekit,cdsteinkuehler/linuxcnc,ianmcmahon/linuxcnc-mirror,bobvanderlinden/machinekit,RunningLight/machinekit,araisrobo/machinekit,araisrobo/linuxcnc,ianmcmahon/linuxcnc-mirror,araisrobo/machinekit,ikcalB/linuxcnc-mirror,bobvanderlinden/machinekit,aschiffler/linuxcnc,cnc-club/linuxcnc,ArcEye/machinekit-testing,ikcalB/linuxcnc-mirror,kinsamanka/machinekit,Cid427/machinekit,unseenlaser/machinekit,ArcEye/MK-Qt5,EqAfrica/machinekit,ArcEye/machinekit-testing,aschiffler/linuxcnc,bmwiedemann/linuxcnc-mirror,ikcalB/linuxcnc-mirror,araisrobo/linuxcnc,ikcalB/linuxcnc-mirror,araisrobo/machinekit,mhaberler/machinekit,cnc-club/linuxcnc,Cid427/machinekit,araisrobo/linuxcnc,bobvanderlinden/machinekit,unseenlaser/machinekit,RunningLight/machinekit,bobvanderlinden/machinekit,araisrobo/machinekit,RunningLight/machinekit,strahlex/machinekit,jaguarcat79/ILC-with-LinuxCNC,ArcEye/MK-Qt5,mhaberler/machinekit,cnc-club/linuxcnc,unseenlaser/linuxcnc,mhaberler/machinekit,jaguarcat79/ILC-with-LinuxCNC,EqAfrica/machinekit,cdsteinkuehler/linuxcnc,cdsteinkuehler/MachineKit,ArcEye/machinekit-testing,Cid427/machinekit,kinsamanka/machinekit,Cid427/machinekit,ianmcmahon/linuxcnc-mirror,ArcEye/MK-Qt5,araisrobo/machinekit,strahlex/machinekit,mhaberler/machinekit,kinsamanka/machinekit,unseenlaser/linuxcnc,araisrobo/linuxcnc,araisrobo/machinekit,ikcalB/linuxcnc-mirror,cdsteinkuehler/MachineKit,unseenlaser/machinekit,RunningLight/machinekit,ikcalB/linuxcnc-mirror,ianmcmahon/linuxcnc-mirror,kinsamanka/machinekit,kinsamanka/machinekit,cdsteinkuehler/MachineKit,bobvanderlinden/machinekit,narogon/linuxcnc,bobvanderlinden/machinekit,ianmcmahon/linuxcnc-mirror,araisrobo/machinekit,cdsteinkuehler/linuxcnc,strahlex/machinekit,ArcEye/MK-Qt5,bmwiedemann/linuxcnc-mirror,kinsamanka/machinekit,mhaberler/machinekit,kinsamanka/machinekit,strahlex/machinekit,strahlex/machinekit,cdsteinkuehler/MachineKit,unseenlaser/machinekit,jaguarcat79/ILC-with-LinuxCNC,cdsteinkuehler/linuxcnc,strahlex/machinekit,bmwiedemann/linuxcnc-mirror,EqAfrica/machinekit,EqAfrica/machinekit,unseenlaser/machinekit,mhaberler/machinekit,cdsteinkuehler/MachineKit,EqAfrica/machinekit,ArcEye/machinekit-testing,bmwiedemann/linuxcnc-mirror,cnc-club/linuxcnc,cdsteinkuehler/MachineKit,ArcEye/MK-Qt5,aschiffler/linuxcnc,mhaberler/machinekit,ArcEye/MK-Qt5,strahlex/machinekit,aschiffler/linuxcnc,cdsteinkuehler/linuxcnc,EqAfrica/machinekit,narogon/linuxcnc,RunningLight/machinekit,ikcalB/linuxcnc-mirror,ArcEye/machinekit-testing,araisrobo/linuxcnc,ianmcmahon/linuxcnc-mirror,bmwiedemann/linuxcnc-mirror,RunningLight/machinekit,aschiffler/linuxcnc,Cid427/machinekit,ianmcmahon/linuxcnc-mirror,jaguarcat79/ILC-with-LinuxCNC,EqAfrica/machinekit,Cid427/machinekit,unseenlaser/linuxcnc,cnc-club/linuxcnc,ArcEye/MK-Qt5,Cid427/machinekit,narogon/linuxcnc,RunningLight/machinekit,unseenlaser/linuxcnc,ArcEye/machinekit-testing,cnc-club/linuxcnc,bobvanderlinden/machinekit,EqAfrica/machinekit,mhaberler/machinekit,RunningLight/machinekit,bmwiedemann/linuxcnc-mirror,ArcEye/machinekit-testing