improve "$arch" variable usage

- handle the (default!) undefined case;
- really treat it as a number (cause that's the way it is defined everywhere in "check_architecture", and it is compared to a number too);
- (try to) avoid extra ops by reordering the operations.


* users will run into the undefined case whenever checking a remote server