replace hardcoded /bin/cp with cp for portability