Fixed permissions for functions.sh