Wait for job file to properly close

Should prevent errors such as:
    /bin/bash: SCRIPT: /bin/bash: bad interpreter: Text file busy
Run Popen with close_fds=True to submit job script

This should prevent the process from hanging on to the file descriptor
for writing the job script, the root cause of the text file busy error.
Add comment on close_fds=True for job submission
Merge pull request #585 from matthewrmshin/lsof-jobfile

Submit job file with close_fds=True

This is to ensure that the process properly closes the file descriptor that was used to write the job file. Otherwise, the execution may randomly fail with a `text file busy` error.