Builtin function TakeScreenshot support savepath and sync params.

Builtin function TakeScreenshot currently does not support save to specified dir or path, and also not saved sync, but the internal function indeed support these feature, so this PR add the feature to the builtin function api, this will make add-ons to take screenshot more easy and make the function more useful.