anchor.diff:            (directory-fd-p fd))))))
   
   (defun directory-fd-p (fd)
  +  "Returns non-nil if the given fd points at a directory."
     (s-isdir (slot-value (fstat fd) 'st-mode)))
  +
  +(defgeneric path-invalid-message (condition)
  +  (:documentation
  +   "Access the human-readable description of of what is wrong"))
   
   (define-condition path-invalid (error)
     ((message
       :type string
       :initarg :message
  -    :reader path-invalid-message))
  -  (:report (lambda (c s) (format s "Path is invalid.  ~A" (path-invalid-message c)))))
  +    :reader path-invalid-message
  +    :documentation
  +    "The human-readable description of what is wrong"))
  +  (:report (lambda (c s) (format s "Path is invalid.  ~A" (path-invalid-message c))))
  +  (:documentation
  +   "A condition that is signaled when a given path string isn't suitable."))
   
   (defun %pop-working-directory ()
  +  "The non-locking version of `pop-working-directory'."
     (let ((fd (pop *working-directory-fds*)))
       (fd-release fd)
       (values)))
   
   (defun pop-working-directory ()
  +  "Pop a directory off of the working directory history."
     (with-lock-held (*working-directory-lock*)
       (%pop-working-directory)))
   
   (defun %push-working-directory-fd (fd)
  +  "The non-locking, fd-centric version of `push-working-directory'."
     (fd-retain fd)
     (push fd *working-directory-fds*))
   
   (defun push-working-directory (path)
  +  "Push a new directory onto the working directory history."
     (with-lock-held (*working-directory-lock*)
       (with-fd-scope ()
         (let ((dir-fd (%try-opening-path path)))
  
positive.code:     (fd-autorelease (openat-retained (%current-working-directory-fd) path o-rdonly))))
  
  (defun directory-p (path)
    (with-lock-held (*working-directory-lock*)
      (with-fd-scope ()
        (let ((fd (%try-opening-path path)))
  
negative.code:  'destroy-preserved-working-directory-history)
  
  (defun %try-opening-path (path)
    "Open the given path if it exists and return the fd associated with the file.
  
  Returns nil if the given path doesn't exist."
    (handler-bind
        ((syscall-error
          (lambda (e)
  