Update for Go 1.1.
Use crypto/rand instead of reading from /dev/urandom manually.