Encode invalid characters in filenames.
Merge remote-tracking branch 'ornedan/master'