Use local tmp dir first if it exists

Moved around tmp path searching. The old way made it really hard to install from a local location as any of 4 other valid locations would break out of the loop and it was hard to know which one you should put the pre-downloaded file in.

Now if you have a local tmp folder it will use that first. Otherwise it falls back to the old methods.