Set build number when running tests at Sauce Labs

Taken from Wikibase repository.
Use rest_client instead of curl when using Sauce Labs API

Taken from Wikibase repository.