I wrote this script because I wanted to migrate permissions from one database to another and couldn't easily get ahold of the schema-level permissions I knew I had granted.
TO USE:
set the parameters for REPORT, GRID or SCRIPT (DEFAULT IS GRID).
execute