Add support for various join types.

Fixes issue #9
Merge branch 'issue-9'