Added ability to log to file. Some refactoring and setup code. Note:
settings file changed.

Please update your copy of the settings.py file. The following changes
have been introduced:

* new LOGFILE variable to point to a logfile. This is a silent change, if
you don't set the LOGFILE varible, logging takes not place.
* ALLOWED_EXTENSIONS is extended with zip, tar.gz and tar.bz2
* extensions, please update your settings
* the ADMINS set should contain email addresses for email logging (this
is not yet activated, hoever prudent to change now.

Also manage.py does now have a command to create tempdirs:

  ./manage.py mkdirs

It discovers relevant directories from app settings and tries to create
the directories.