Creating or editing a pdf template throw a php fatal error (eg. a blank page)

Passing a directory as argument for a require_once() php call throws a fatal error, i added a simple check to skip everything that is not a regular file.

This problem occured on our environments because of automatically created subversion directories