Properly detect current file, forgot to adjust detection stuff in upload API after renaming things in the job tracking.

Thanks to Bryan Mayland for spotting this.

Closes #476
Merge remote-tracking branch 'origin/devel' into devel