detect if Composer returned unsuccessful exit code

update according to [scribu's suggestion](https://github.com/wp-cli/wp-cli.github.com/pull/23#issuecomment-24018000)