from Lawrence D'Oliveiro (ldo) more efficient implementation of BLI_file_size that doesn't open the file.