Fix EZP-23518: Clearing image aliases with Symfony console with --purge ...

...option results in PHP warnings

JIRA: https://jira.ez.no/browse/EZP-23518

The removeAliases Method expected a string variable. But it get a BinaryFile Object.