Add a facility and manipulate path to remove mocks

* Add a way to append and remove to PATH
* Use that in tests to have subprocesses using the tweaked dpkg
* Reorganize and fix some tests
* Rename function for reopening the case