fix issue with logging non utf8 chars
encode imagePath and fix documentation of loadFromFile
Merge pull request #6445 from owncloud/fix_5956

fix issue with logging non utf8 chars