[#1402] Fix assertTempIsClean.


Problem description
===================

assertTempIsClean is not working.


Why we got into this (5 whys)
=============================

* There were not tests for it.


Changes description
===================

Beside fixing assertTempIsClean I took the oportunity to fix some other things in empirical.




How to try and test the changes
===============================

reviewers @alibotean  @bnickname 

Check that code make sense and tests pass on your system.

```
paver test
```