Add support for .chain

Hello @x-ma, 

Please review the following commits I made in branch 'dpup-chain'.

5dadb3fdb65b35dff76267e562c17cd7fe030db7 (2013-05-31 14:34:54 -0700)
Add support for .chain


R=@x-ma