More shell fixes
Fixup shell handling in monit module.