Fixes quoting of cmd argument contains space for PhantmJS.

Fixes issue #6163.