Fixed an error with infinite directory recursion in Linux.