Specify encoding "raw" when writing files on the disk

Without this, binary files with UTF-8 environment are mangled.

The first case was tested. The second was not, but there should be no sensible reason to encode file uploaded.