Moved thumbnail directory path to config file; fixed possible resource leak; made runserver accept arguments