Added checking for regular files, directories and symlinks.

latest commit 196c4c7d5b
@dracorp authored