bug 1003: Initial version of reset permissions script