use $this->app['files']->isDirectory().

Signed-off-by: crynobone <crynobone@gmail.com>