Refs #6. More-reliable way of getting the commit for a build