Make all unit test pass so we can start using travis for zcache

Hello @nicks, 

Please review the following commits I made in branch 'xiao-make-all-unittest-pass'.

b8bc2411aab66a745cf826e74f22d9e6b4ddb344 (2014-04-04 09:14:11 -0700)
Make all unit test pass so we can start using travis for zcache

R=@nicks