Have you tried downloading the latest update off r4ids.cn? (wood r4igold 1.27b)
It fixed all the problems I had running homebrew. It should fix the moonshell problem too (sounds like the same problem, on mine running previous r4igold wood 1.27 no homebrew worked).