templates / branches--on commit write_shared_index(): use tempfile module (f6ecc62)
   1: this is just to ensure the directory exists.