fixed close sync issue
daemon_test: use proper temp dir