Trivial fixups

1. Use `p_mkdir` instead of `mkdir`
2. Clear the error in `git_repository_head_unborn` when the HEAD is, in fact, unborn