Use pipes properly to avoid buffering errors
Allow passing extra arguments to PhantomJS