fix appendfile problem on macos.
when i open file with mode 'a+' on linux, seek position is 0.
on macos seek position is end of file instead. not documented.
#header#
<title>Mercurial Error</title>
</head>
<body>
<h2>Mercurial Error</h2>
<p>
An error occured while processing your request:
</p>
<p>
#error|escape#
</p>
#footer#