Added a trailing file separator check for tmpDir

The js resources were not copied on tomcat due to tmpDir missing a trailing file separator.
App tried creating /var/tmpphantomjs rather than /var/tmp/phantomjs