fixes, end-to-end tests

These directories are created in tobinary.py and removed in tobinary.py (tmp for example). But in case there already exists such files, remove them first.