Fix explore-current-directory for dired/magit buffers