NOJIRA: fixes to deployCGIscript.py

Added checks to ensure that target directories exist (could be replaced
by changing cp to rsync?). Script now sets some permissions (not sure if
more necessary)