updated database.py to stop metalock issues with MySql 5.5 and rewrote bittorrent file handling logic
Merge pull request #13 from disputin/master

updated database.py and bittorrent.py, thanks to disputin