Added depth argument

Currently only works with circular == false, but there won't be many use cases where circular == true and depth < Infinity.
Merge pull request #26 from nathanmacinnes/master

Add depth argument