Bugfixes

These fixes were necessary to make `s3direct` work for me with Django 1.5.