removed useless var assignment in exclude_directory function