util&mesa: add and use os_file_create_unique()
Better fix for !1085 (closed)
This is untested though, just like !1085 (closed), but this time the code is not shuffled around, so I would appreciate if someone could tell me how to test this, and if someone with a windows machine could test it for me :)