webContents.executeJavaScript should run code after page is loaded.

Fixes atom/atom#1805.