isDir function

Checks existing directory