Added a method to create a .torrent file.

Also fixed a GUI bug.