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

Fixes #194
Merge pull request #197 from Pyker/patch-4

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