Fixing passing of empty arrays

Hello sho, 

Please review the following commits I made in branch 'jeremy-jank'.

b55b72d4d20dd3ccd1a6a13c12ed2d25e58ca9cb (2013-02-27 10:20:07 -0800)
Fixing passing of empty arrays in shepherd

R=sho