Extends `stats.isDirectory()`, returns `true` if a filepath is a directory.