CFile: Don't cast potential negative values to unsigned int

This tries to fix a segfault we are seeing here: https://github.com/xbmc/xbmc/pull/5947

I am not sure what we should do with negative values.

@Milhouse: Can you test that instead of the linked above fix?