util: Add error handling to become_daemon()