Correct few bash typo errors

- conditionals in bash aren't == but = 
- to check existence of a variable use -n "$VAR" instead of -n $VAR (this is always true)
- clean gems only if they were downloaded