Fixed broken images when using ImageMagick and filename contains whitespaces