fixed import error, and threading error

`daemon` argument is added in [Python 3.3](https://docs.python.org/3.3/library/threading.html#threading.Thread) but in Debian (and probably some other distros too) uses Python 3.2; commit c9c6b9d works in both versions.

Also `DEVNULL` added in [Python 3.3](https://docs.python.org/3.3/library/subprocess.html#subprocess.DEVNULL) as well but commit 9b2dafb works in both versions as well.