fdo#74013 make makedocs.sh look in correct project header directories

At the moment, project headers can be either in $PROJECT/inc or
include/$PROJECT. I believe it is possible for them to be in both
locations. Unfortunately, we check for both areas, and doxygen spits
out an error.

Fix is to check if the header directory exists, only use it if it does.

Change-Id: I2e59d8ce0028c20b7d239dcc6e07792edf7078d1
Reviewed-on: https://gerrit.libreoffice.org/7631
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>