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
min refs
Merge pull request #1 and polish environment cleanup.
Updated to latest NewRelic agent.