Wait until DOM ready state is complete until injecting scripts. Fixes issue #9