Improve check-includes.sh
diff --git a/src/check-includes.sh b/src/check-includes.sh
index 015f663..5643c69 100755
--- a/src/check-includes.sh
+++ b/src/check-includes.sh
@@ -10,12 +10,10 @@
 test "x$HBSOURCES" = x && HBSOURCES=`cd "$srcdir"; find . -maxdepth 1 -name 'hb-*.cc' -or -name 'hb-*.hh'`
 
 
-cd "$srcdir"
-
-
 echo 'Checking that public header files #include "hb-common.h" or "hb.h" first (or none)'
 
 for x in $HBHEADERS; do
+	test -f "$srcdir/$x" && x="$srcdir/$x"
 	grep '#.*\<include\>' "$x" /dev/null | head -n 1
 done |
 grep -v '"hb-common[.]h"' |
@@ -28,6 +26,7 @@
 echo 'Checking that source files #include "hb-*private.hh" first (or none)'
 
 for x in $HBSOURCES; do
+	test -f "$srcdir/$x" && x="$srcdir/$x"
 	grep '#.*\<include\>' "$x" /dev/null | head -n 1
 done |
 grep -v '"hb-.*private[.]hh"' |
@@ -36,7 +35,10 @@
 
 
 echo 'Checking that there is no #include <hb.*.h>'
-grep '#.*\<include\>.*<.*hb' $HBHEADERS $HBSOURCES >&2 && stat=1
+for x in $HBHEADERS $HBSOURCES; do
+	test -f "$srcdir/$x" && x="$srcdir/$x"
+	grep '#.*\<include\>.*<.*hb' "$x" /dev/null >&2 && stat=1
+done
 
 
 exit $stat