Fix configure --mandir. Tidy up configure.in which allows us to use recent autoconf versions.
Fix file mode bits for installed manual page.