Reopen server stdout/stderr after daemonization
Fix sys.path, avoid name clash with the 'main' module