shell: fix incorrect parameter reference in helper function

Not sure how this was working anywhere previously.  I guess $0 must
have been correct during testing for Nick.  Anyhow, this should fix it.