Ensure .CURDIR contains an absolute path without a trailing slash.
Problems can occur when PORTSDIR is a symbolic link, or e.g.,
make -C /usr/ports/ search key='!*'
See also:
r450002
https://lists.freebsd.org/pipermail/freebsd-current/2017-November/067386.html
Submitted by: rum1cro@yandex.ru
Reported by: sergey.dyatko@gmail.com
Approved by: portmgr (bdrewery)
Differential Revision: https://reviews.freebsd.org/D13019