Put 'cdr' in a shell function.

Scripts run in subshells. Changing directories would have no effect on
the shell the script is started in.