Also use fread to get UIDs from /dev/random.

This is mainly for completeness, since all the other stream calls
have been converted to fread and fwrite.  According to the profiler,
fread provides only a 13% speed increase here.