Refactor the dired_preview_refresh command.