Use PHP code to natively copy and delete stuff in composer.json

Fixes #194