Fix my/revert-buffer-dwim to handle dired buffers properly.