[web/staticcontrollers] create a unique temporary file for concat handling
Predictable names means different processes can race against each other.
Let's avoid that and use mkstemp to get a real unique temporary file,
and atomically rename it when we're done.
Closes #3524182