Client: define returncode before try block

Since this variable is used in the except clause, it should be
defined before the try block.  It should also be set to the return
code rather than the Crab status code for printing in the event of
an exception.