[WIP][ticket/6715] Support non-ASCII avatar gallery folders

Folders and files that contain non-ASCII characters are currently incorrectly displayed and do not properly work. This patch will fix that.

Patch currently only works on Windows.

Ticket: http://tracker.phpbb.com/browse/PHPBB3-6715

PHPBB3-6715