Create .git/info directory if it does not exist before grafting

When cloning a new repository the directory .git/info does not
always exist. This change ensures this directory is always created
before trying to write to a file in that directory.

Change-Id: I9488caa7c4d0d80588ba880bee3bf9d8c11cca92
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>