Fixed the registration of commands with invalid JSON file

When the JSON file in the current folder is invalid, the registration of custom commands should be ignored rather than breaking the usage of Composer entirely.
Closes #3165