Fixed bug in io/termination energy calculation.

Not it takes the clock period into account. Updated test accordingly.