adding multi file spanning to jobsplitting

Hi @ticoann, this fixes issue #4878  (hopefully! :S) although I think it still needs testing. Please review

Cheers
Alex