Fix EZP-21883: Regression from ezp-21357 with images with utf-8 names

Link: https://jira.ez.no/browse/EZP-21883

## Description
In https://jira.ez.no/browse/EZP-21357 wildcard shell characters had been escaped to avoid ImageMagick's side effects.

The basename() and dirname() methods are using the default locale to deal with utf-8 strings and it could cause problems if the setlocale() hasn't been set.

$sourceMimeData variable  already contains "utf-8 friendly information" regarding the dir and the basename of the image, so this PR replaces the call to the methods by these values.

## Test
Manual tests