Couple of pdf.js fixes

 - Wait for the DOM to fully load before running
 - Split level with regex rather than on word ‘level’. Regexing for a
   number is a more general solution.
Make phantomjs wait until js has finished running…

…or until it times out.