Using a dictionary, finds a path from one word to another