Fixed a small bug in --extension_configs CLI option.

This needs to work  with the JSON lib if PyYaml isn't available.
Therefore, we can't catch a yaml specific exception.

The tests are fine using a yaml specific exception as the yaml lib
is required by the testing framework anyway. So yaml is always
available when running the tests.