return false if path doesn't exist in isDirectory

just throw errors instead of catch and re-throw to make stacktrace nice
fix compile errror - catch exception and return false
Merge pull request #1 from jaffee/master

return false if path doesn't exist in isDirectory