Fix symbolic link loops during os.walk

This pull request fixes a problem with symbolic links when the project contains symbolic links that enter infinite loops. For example a user can specify a symbolic link in the project directory that links to the project directory itself.

@diegobz Please review and merge.