added -a (append) option to append to log file. default is to
recreate the file on start of job.

turn append on after we remove the file.

moved all functions to beginning of code

log the backupDir used at top of log