Don't compute md5 digest when file size is unknown

When loading files from memory, file size may be set as 0 (meaning the
size is unspecified). In this case, don't compute the md5 sum when
loading the file.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Don't perform arithmetic on void pointers

Certain compilers such as VC++ don't allow void pointer arithmetic, so
cast to char.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>