Fail if /dev/urandom could not be read

Make sure we do not succeed if /dev/urandom could not be read. Otherwise
we generate a uuid based on uninitialized data, which is not really
random.

Fixes #737.