added mock torrent tests
more refactoring, fixed some bugs in alternate_path and location handling