daemon_context can be used with a foreground argument
rename daemon_context to pidfile_context
add logs when daemonizing
fix pep8 warnings
Merge branch 'daemon-context'