Provide for adding a string to /etc/hosts.

This is needed for the test environments that are isolated from the
real network including DNS etc.

Change-Id: Ibeb39dfc0abbce25c8f6384c86e502c8c767aed1