title: AppleScript: how to get the current directory of the topmost Terminal
body: <p>I want to get the current directory of the topmost Terminal tab/window (via AppleScript or something else, it doesn't really matter). How can I do that?</p>