revlog: make sure the files are closed after an exception happens
This prevents a corruption when the writes happen after the truncate
initiated by the transaction rollback.
#!/bin/shhg initecho a > ahg ci -Am0touch .hg/store/journalecho foo > ahg ci -Am0hg recover