make M-g n and M-g p work in dired mode