cmFileTimes: return status codes from APIs This avoids accidentally overwriting the global error state before fetching the intended error code.