fix permissions on scripts/functions