Proper token check in python rpc, move sessions to /tmp, execute shell if python command have args