Update client.py

Moved never-actually-functional _close_socket call to earlier in _reconnect
fix
Fix getmetadata shell command

The "getmetadata" command cannot be run because the "get" command is
shadowing it.
Merge pull request #220 from kevinballard/fix-shell

Fix getmetadata shell command
Merge pull request #217 from holbech/patch-1

_close_socket in _reconnect unusable at current location