Rename based on tree walking rather than argv

Also fix a typo (thanks Jess!)