Cache isDirectory() call to isDir

Save method calls

Signed-off-by: Tim Smart <tim@fostle.com>
v0.0.3

Signed-off-by: Tim Smart <tim@fostle.com>