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

Helix edition of: https://github.com/xbmc/xbmc/pull/6005