validate range of --rpc-port option (fix #605)