Fixed `update_permissions` on django 1.7. Added a test.
Merge pull request #542 from AsymmetricVentures/test_update_permissions

Fixed `update_permissions` on django 1.7