Review and rewrite some parts of the script

Some revisions and improvements:
- Using glob instead of ls as its output is formatted for humans and will cause bugs in scripts
- Using arrays for argString
- "Double quoting" every expansion, and anything that could contain a special character
- Using [[ .. ]] for testing strings or files, (( .. )) for testing numbers and 'if ..'' for testing commands
- It now chooses only directories and only lang directories for PDF generation