Refactor shell.rsh to reuse logic copied from shell.rsh into shell.local.
Refactor shell.rsh to reuse logic copied from shell.rsh into shell.local.

galaxyproject/pulsar,jmchilton/pulsar,jmchilton/lwr,jmchilton/lwr,ssorgatem/pulsar,ssorgatem/pulsar,jmchilton/pulsar,natefoo/pulsar,natefoo/pulsar,galaxyproject/pulsar