Fix up restart Apache2/Varnish to be testable.

Added option to override command and fixed error handling.