Don't download files to master's working directory.

This should avoid exceptions caused by existing
files with different contents.

I also removed some unused code.
Add synchronization to Executor.updateDependencies() (SPARK-662)