Fix undefined property error

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| License       | MIT

This PR fixes bug `Undefined property: Composer\Script\CommandEvent::$getIO` in `clearCache()` and `installAssets()` handlers.