Move IsDir function to Util class

Testing symlinks pointing to a directory is required for repo compatibitly