io: add function isDir

This function will check whether the given path is a directory.
io: add isFile

This function will check whether the given path is a regular file.
Merge pull request #358 from fsouza/isdir

io: implement isDir and isFile [on behalf of fsouza]

Add the ability to check if a given path is a file and the
ability to check if a given path is a directory to the language.