Fix for Savannah bug #100948
Put the scp commands for staging output file in the right place before the "exit" command.