Don't perform permission checks for scripts named with -ghci-script (#6017)