Handle Dired(+) buffers

(buffer-file-name) evaluates to nil in Dired buffers: Use
default-directory (current directory) as fallback in Dired(+) buffers.