Fix bugs in C2PAP part.

Change the way the submission of jobs is done to ensure that the deletion of
the temporary file does not crash the job. Also remove a debug printout which
was overlooked before.
Merge pull request #8 from legordian/master

Fix bugs in C2PAP part.