man: the exists function needs to validate the first parameter
This fixes an issue with the ".so " macro for FreeBSD
ports manual pages.
PR: 275978
Reported by: Jamie Landeg-Jones <jamie@catflap.org>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45231 (discussion)