Fixed the admin rights functionality so that it actually now grants admin rights

I had made a mistake in earlier versions of these scripts, where admin
rights weren't actually being granted. Now fixed.