Replace insecure temporary file creation with devshm.

Why 10000? Add a comment.