use built-in is_dir() function
Merge pull request #72 from bifek/functions

use built-in is_dir() function