Testing for bots should be case insensitive - facebook bots are not all
lowercase - they adapted CamelCase on some servers. I've added the
linkedin bot just for the sake of it.
The previous version only killed the wrapper bash script, not the child. We now
work around the broken (socketpair) stdin presented to Node's child processes by
using a bash heredoc rather than "cat |"; this means we can use exec, which only
gives us one process to clean up.
While we're at it, simplify code by switching from child_process.spawn to
child_process.execFile, which does the work of capturing stdout and setting a
timeout for us automatically.
If the "check to see if page is ready" interval ran when "Meteor" is defined but
"Meteor.status" is not yet defined, an error message about trying to call an
undefined function would be dumped into the output source before the page
itself.
This can be easily reproduced by changing the timer interval from 100 to 1.