Add option for exclusive creation to `write`

Write currently always opens the file as `mode='w'`. `mode='x'` would be interesting as well.