When downloading NicovideoSeiga image, the saved file extension has become wrong type. This commit addresses the issue by fixing following errors.
- Images is determined the type by file header. The logic has wrongly assumed Byte.toInt() returns unsigned integer, but it actually returns signed value.
- The server returns application/octet-stream as Content-Type header. But the logic only worked when header is empty.