Fix .torrent links

Version 2 broke all external links (eg, http://example.com/torrent/7ED0137D09E1FE26B39F5E650B2F9DEE08F3E2F4.torrent).  Additionally, the files were stored without the '.torrent' extension.  Clicking the download link after uploading a torrent gave a "File not Found" error because of this.

These changes re-add the ".torrent" extension to the file stored on the server, as well as the file that is sent to the client.  This does not break the new torrent links (eg, http://example.com/7ED0137D09E1FE26B39F5E650B2F9DEE08F3E2F4) nor change the link displayed upon upload.  The additional rewrite rule enables both the old link format, as well as the new one with or without ".torrent" appended.

I am unable to test the Apache RewriteRule addition, but there shouldn't be any issues.