Previously, when no head was present under .git/refs/heads, we simply died as we couldn't open the file. Now, simply return None in case we cannot read from it. Signed-off-by: Rocco Rutte <pdmef@gmx.net>