p_mkdir != mkdir on win32
repository_head_unborn: clear error when HEAD is unborn
Merge pull request #2597 from ethomson/fixup

Trivial fixups