Implemented executeAsync and asyncScriptTimeout.

This allows asynchronous scripts to be run in the browser context.
Also modify the import code so that it doesn't attempt to import
non-JS files.