srand and mkdir so_generated added.

srand and mkdir so_generated added