job file: fsync to file system before close

Flush and fsync job file to file system before close. This is an attempt
to prevent this type of error (seen on virtual machines) when we execute
the job file:
   /bin/bash: SCRIPT: /bin/bash: bad interpreter: Text file busy
Merge pull request #582 from matthewrmshin/job-file-fsync

job file: fsync to file system before close