tag: handle .hgtags and .hg/localtags with missing final newline (issue 601)
This also fixes an asymmetry bug in which we called the pretag hook if we
were going to create a local tag, but didn't call the tag hook afterwards.
#header#
<title>Mercurial repositories index</title>
</head>
<body>
<h2>Mercurial Repositories</h2>
<table>
<tr>
<td><a href="?sort=#sort_name#">Name</a></td>
<td><a href="?sort=#sort_description#">Description</a></td>
<td><a href="?sort=#sort_contact#">Contact</a></td>
<td><a href="?sort=#sort_lastchange#">Last change</a></td>
<td> </td>
<tr>
#entries%indexentry#
</table>
#footer#