Fix fd leak on git cmd.

Currently if command is called with as_proces=True, pipes for the
command will not be closed.

This change makes sure to close command file descriptors.

Conflicts:
	git/cmd.py