Add checkout argument to clone. Fixes #503