Save errno right after syscalls.

Save errno right after calling into ReadFileToString
/ opendir / readdir because std::string::operator+ may
allocate memory, which may cause errno to be set.

Test: builds
Bug: 155407386
Change-Id: I8a08b1d921bff5e053ea888d932e99d7c7bc74c7
1 file changed