move keys and refresh dired when moving between files