making daemon script generation async.
pulling OS-specific logic into platform-apis plugin directory.