A nascent recovery in the housing market helped Home Depot report higher quarterly sales and earnings on Tuesday.