Fix cloning a repository with a particular branch to checkout

We were missing a cast to bytes. Add a test for this option as well and
remove the old commented-out test for checkout_branch, which is
superseded by this one and whose last bit seemed confused about what the
option means.

This fixes #399
Merge remote-tracking branch 'carlos/checkout-branch'