Fixed `update_permissions` on django 1.7

Django 1.7 changed the way they do "applications" as such, the API changed.

This patch adds a test to make sure that the `update_permissions` command actually works, and also fixes the command for django 1.7.