build: Replace non-portable cp -d