Use os.urandom() to read from /dev/urandom

Fix for issue #5: Use os.urandom() instead of f.read(n), so that we really read only n bytes, not 4kB.