fixed check for symlink (I should really get to know some operators better)