Wait until the HEAD is rendered before injecting a script into the head

@EamonNerbonne Please review this fix before pushing the update to the webstore.

In the case of "document_start", the files are injected after any files from css, but before any other DOM is constructed or any other script is run.