Run phantomjs with 'sh' rather than 'exec' so the terminal works after success