A bug fix & an optimization:

- Move the try/catch around the JSON.parse() into a separate
function so the main one can be optimized.
- Check for an object result, not just a failure in the parse.
  This handles the case where bistre is handling all output from
  a process and you do something like `console.log(3)`. The bare
  number is valid JSON, but not a structured json log line.
- Check for the existance of the name property before trying
  to call .replace() on it. Revealed by the previous case, though
  not strictly necessary now that we short-circuit. Still, this is
  safer.
Merge pull request #2 from ceejbot/master

A bug fix & an optimization