Various fixes and improvements

Addresses a couple of issues (see commits for details):
- Fixes #1
- Closes #2

Also: 
- fixes the distribution packaging (`MANIFEST.in` contained some errors)
- fixes the sample application (import in `settings.py` referenced the obsolete name of the middleware)