Rework how torrent.open creates files/directories

This allows torrent.open functions to run concurrently, as it no longer
uses os.Chdir which would otherwise cause problems with the working
directory.