Fix JSON handling in remote proxy update

Implement `--as-json` argument in gear rotation commands. Correctly implement error handling when processing remote proxy command results.