make daemonizer a little more robust and add tests to check files are created and cleaned correctly
flake8