Obtaining EF record link or recordGUID from file system path

You can use AppleScript to look up a record by path (library record whose file is "…") and to get the record link or GUID.