In sync-dir, actually perform the syntax check

php -l on a directory just says "no errors" without checking anything.

Change-Id: Ic40757f3f04fadd9a9813c781b93669c6192faa2