Wait maximum of 30 seconds for document.readyState==complete.

Potentially fixes #11.