Throw an exception in PhpRenderer when the resolved file path is not rea...

...dable or is a directory.

Proposition to fix the issue which is discussed in the #5258.