Bug fix in the script

syntax error in the shell script, plus wrong home directory permission