Fix misc. issues reported by Coverity.

Some uninitialized values, a possible null pointer dereference, and
time-of-check-time-of-use on reading random seed file.