Fix for the 'SSH session not active' exception

Conflicts:
	fabric/state.py
Changelog re #402, fixes #402