reorder contractor locks to avoid deadlock
Created by: ChrisSchinnerl
This PR hopefully fixes #2491.
The order of acquiring locks should be renter lock first and then file locks like in workerupload:179
. In files.go:239
we did it the other way round which cause a deadlock.