   (let ((last (1- (length path))))
     ;; Note: shouldn't get an empty path, so for performance
     ;; I'm not going to check for that case.
-    (if (char-equal (aref path last) ?/) ; <-- FIXME nonportable?
+    (if (eq (aref path last) ?/) ; <-- FIXME nonportable?
         (progn
           ;; Directory
           (put-text-property 0 last 'face lusty-directory-face path)

           (/ sum (length scores))))))

(defun* LM--build-score-array (str abbrev)
  (let ((scores (make-vector (length str) LM--score-no-match))
        (str-lower (downcase str))
        (last-index -1)
        (started-p nil))
    (loop for c across (downcase abbrev)
          for i = (position c str-lower :start (1+ last-index))
          do
        (when (null i)
          (fillarray scores LM--score-no-match)
          (return-from LM--build-score-array scores))
        (when (zerop i)
          (setq started-p t))
        (cond ((and (plusp i)
                    (let ((C (aref str (1- i))))
                      (or (char-equal C ?\ )
                          (char-equal C ?.)
                          (char-equal C ?_)
                          (char-equal C ?-))))
               ;; New word.
               (aset scores (1- i) LM--score-match)
               (fill scores LM--score-buffer :start (1+ last-index) :end (1- i)))
              ((and (>= (aref str i) ?A)
                    (<= (aref str i) ?Z))
               ;; New word.
               (fill scores LM--score-buffer :start (1+ last-index) :end i))
              (t
               (fill scores LM--score-no-match :start (1+ last-index) :end i)))
        (aset scores i LM--score-match)
        (setq last-index i))

    (let ((trailing-score
           (if started-p

  "Return FILES with './' removed and hidden files if FILE-PORTION
does not begin with '.'."
  (macrolet ((leading-dot-p (str)
               `(eq (string-to-char ,str) ?.))
             (pwd-p (str)
               `(string= (directory-file-name ,str) "."))
             (ignored-p (name)
