Added createGist operation and amended authorization lookup

Added createGist operation and amended authoization lookup not to just
take position 0. Instead changed lookup to iterate authorizations and
check for one with a matching scope.