Finished changing 'basename' lines with the equivalent zsh shell function